summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-manage
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 /install/tools/ipa-replica-manage
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 'install/tools/ipa-replica-manage')
-rwxr-xr-xinstall/tools/ipa-replica-manage2
1 files changed, 1 insertions, 1 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index 58b62cdff..e92561f85 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -707,7 +707,7 @@ def del_master_managed(realm, hostname, options):
Removing of master in managed_topology
"""
- hostname_u = unicode(hostname)
+ hostname_u = ipautil.fsdecode(hostname)
if hostname == options.host:
print("Can't remove itself: %s" % (options.host))
sys.exit(1)