diff options
author | Christian Heimes <cheimes@redhat.com> | 2018-02-14 16:59:50 +0100 |
---|---|---|
committer | Christian Heimes <cheimes@redhat.com> | 2018-02-15 09:41:30 +0100 |
commit | 8ffa33c24ecae7be41421669ff6114ae56e9a6e7 (patch) | |
tree | ff6fb41bf6fff88240661df96f0bb0d47f63ef78 /ipalib/output.py | |
parent | 86a6fdcc4316a26f40c9e0c0a92d21bec94ccd9c (diff) | |
download | freeipa-8ffa33c24ecae7be41421669ff6114ae56e9a6e7.tar.gz freeipa-8ffa33c24ecae7be41421669ff6114ae56e9a6e7.tar.xz freeipa-8ffa33c24ecae7be41421669ff6114ae56e9a6e7.zip |
Generate same API.txt under Python 2 and 3
Use Python 3's reprlib with customizations to create same API.txt under
Python 2 and 3. Some plugins have been slightly altered to use stable
sorting for dynamically created parameter lists.
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Diffstat (limited to 'ipalib/output.py')
-rw-r--r-- | ipalib/output.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipalib/output.py b/ipalib/output.py index b10458463..afcbefa11 100644 --- a/ipalib/output.py +++ b/ipalib/output.py @@ -25,6 +25,7 @@ import six from ipalib.plugable import ReadOnly, lock from ipalib.capabilities import client_has_capability from ipalib.text import _ +from ipalib.util import apirepr if six.PY3: unicode = str @@ -98,7 +99,7 @@ class Output(ReadOnly): if not value: continue if isinstance(value, tuple): - value = repr(list(value)) + value = apirepr(list(value)) else: value = repr(value) yield '%s=%s' % (key, value) |