summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-08-31 09:08:38 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-07 08:00:11 +0200
commitcc53526fd21d3faa7b90cd873713279c3ce049f5 (patch)
treefc2edb6f2ab2027cdce60f796134488f3ec358c7 /ipa-client
parentcf9bf9dcafa6c6d434440e7b106f1886614eec05 (diff)
downloadfreeipa-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 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-automount2
-rwxr-xr-xipa-client/ipa-install/ipa-client-install2
2 files changed, 2 insertions, 2 deletions
diff --git a/ipa-client/ipa-install/ipa-client-automount b/ipa-client/ipa-install/ipa-client-automount
index 5cac122c2..5e4ab1396 100755
--- a/ipa-client/ipa-install/ipa-client-automount
+++ b/ipa-client/ipa-install/ipa-client-automount
@@ -447,7 +447,7 @@ def main():
# Use the RPC directly so older servers are supported
result = api.Backend.rpcclient.forward(
'automountlocation_show',
- unicode(options.location),
+ ipautil.fsdecode(options.location),
version=u'2.0',
)
except errors.VersionError as e:
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index f6cf2c027..91c78c9b3 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -1811,7 +1811,7 @@ def update_ssh_keys(server, hostname, ssh_dir, create_sshfp):
# Use the RPC directly so older servers are supported
api.Backend.rpcclient.forward(
'host_mod',
- unicode(hostname),
+ ipautil.fsdecode(hostname),
ipasshpubkey=[pk.openssh() for pk in pubkeys],
updatedns=False,
version=u'2.26', # this version adds support for SSH public keys