| |
@@ -11,7 +11,6 @@
|
| |
import simplejson
|
| |
import requests
|
| |
from collections import defaultdict
|
| |
- from textwrap import indent
|
| |
|
| |
import logging
|
| |
if six.PY2:
|
| |
@@ -35,7 +34,7 @@
|
| |
from copr.v3 import (Client, config_from_file, CoprException, CoprRequestException, CoprNoConfigException,
|
| |
CoprConfigException, CoprNoResultException)
|
| |
|
| |
- from .util import ProgressBar, json_dumps
|
| |
+ from .util import ProgressBar, json_dumps, serializable
|
| |
from .build_config import MockProfile
|
| |
|
| |
import pkg_resources
|
| |
@@ -538,12 +537,15 @@
|
| |
def action_list_chroots(self, args):
|
| |
"""List all currently available chroots.
|
| |
"""
|
| |
+ def indent(string):
|
| |
+ return '\n'.join([' ' + l for l in string.split('\n')])
|
| |
+
|
| |
chroots = self.client.mock_chroot_proxy.get_list()
|
| |
- chroots = simplejson.loads(json_dumps(chroots))
|
| |
+ chroots = serializable(chroots)
|
| |
for chroot, comment in chroots.items():
|
| |
print(chroot)
|
| |
if comment:
|
| |
- print(indent(comment, ' '))
|
| |
+ print(indent(comment))
|
| |
|
| |
#########################################################
|
| |
### Package actions ###
|
| |
This adds implementation of indent which is needed for formatting
the output as textwrap.indent() is not implemented in python2.