diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-12 00:46:04 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-12 00:46:04 -0700 |
commit | 014af24731ff39520a9635694ed99dc9d09669c9 (patch) | |
tree | 3e861a7ba9f8ba9d07033fad6827920dfbc46c49 /ipa | |
parent | f3869d7b24f65ca04494ff756e092d7aedd67a5c (diff) | |
download | freeipa-014af24731ff39520a9635694ed99dc9d09669c9.tar.gz freeipa-014af24731ff39520a9635694ed99dc9d09669c9.tar.xz freeipa-014af24731ff39520a9635694ed99dc9d09669c9.zip |
Changed calling signature of output_for_cli(); started work on 'textui' backend plugin
Diffstat (limited to 'ipa')
-rwxr-xr-x | ipa | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -30,7 +30,12 @@ from ipalib import api from ipalib.cli import CLI if __name__ == '__main__': + # If we can't explicitly determin the encoding, we assume UTF-8: + if sys.stdin.encoding is None: + encoding = 'UTF-8' + else: + encoding = sys.stdin.encoding cli = CLI(api, - (s.decode('utf-8') for s in sys.argv[1:]) + (s.decode(encoding) for s in sys.argv[1:]) ) sys.exit(cli.run()) |