diff options
author | Jan Cholasta <jcholast@redhat.com> | 2015-08-31 09:08:38 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-09-07 08:00:11 +0200 |
commit | cc53526fd21d3faa7b90cd873713279c3ce049f5 (patch) | |
tree | fc2edb6f2ab2027cdce60f796134488f3ec358c7 /install/oddjob | |
parent | cf9bf9dcafa6c6d434440e7b106f1886614eec05 (diff) | |
download | freeipa-cc53526fd21d3faa7b90cd873713279c3ce049f5.tar.gz freeipa-cc53526fd21d3faa7b90cd873713279c3ce049f5.tar.xz freeipa-cc53526fd21d3faa7b90cd873713279c3ce049f5.zip |
Decode script arguments using file system encoding
This mimics Python 3's behavior, where sys.argv is automatically decoded
using file system encoding, as returned by sys.getfilesystemencoding(). This
includes reimplementation of os.fsdecode() from Python 3.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'install/oddjob')
-rwxr-xr-x | install/oddjob/com.redhat.idm.trust-fetch-domains | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/install/oddjob/com.redhat.idm.trust-fetch-domains b/install/oddjob/com.redhat.idm.trust-fetch-domains index d19e06f12..138779c0c 100755 --- a/install/oddjob/com.redhat.idm.trust-fetch-domains +++ b/install/oddjob/com.redhat.idm.trust-fetch-domains @@ -63,7 +63,7 @@ if len(args) != 1: # LSB status code 2: invalid or excess argument(s) raise ScriptError("You must specify trusted domain name", 2) -trusted_domain = unicode(args[0].lower()) +trusted_domain = ipautil.fsdecode(args[0]).lower() env = Env() env._bootstrap(context='server', debug=options.debug, log=None) |