summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/ipa_replica_prepare.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-07-15 16:38:06 +0200
committerJan Cholasta <jcholast@redhat.com>2015-07-31 15:22:19 +0200
commitb8c46f2a32d0d8c2dc6ef0867f85f63cf076a004 (patch)
tree28e52d8fe2e3531e226d8c2249d6b7216f80bf48 /ipaserver/install/ipa_replica_prepare.py
parenta908be2785d4388e3c97c7cd543c817c527d73c9 (diff)
downloadfreeipa-b8c46f2a32d0d8c2dc6ef0867f85f63cf076a004.tar.gz
freeipa-b8c46f2a32d0d8c2dc6ef0867f85f63cf076a004.tar.xz
freeipa-b8c46f2a32d0d8c2dc6ef0867f85f63cf076a004.zip
Modernize number literals
Use Python-3 compatible syntax, without breaking compatibility with py 2.7 - Octals literals start with 0o to prevent confusion - The "L" at the end of large int literals is not required as they use long on Python 2 automatically. - Using 'int' instead of 'long' for small numbers is OK in all cases except strict type checking checking, e.g. type(0). https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/install/ipa_replica_prepare.py')
-rw-r--r--ipaserver/install/ipa_replica_prepare.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaserver/install/ipa_replica_prepare.py b/ipaserver/install/ipa_replica_prepare.py
index 5246f5f54..55cdb8ad2 100644
--- a/ipaserver/install/ipa_replica_prepare.py
+++ b/ipaserver/install/ipa_replica_prepare.py
@@ -345,7 +345,7 @@ class ReplicaPrepare(admintool.AdminTool):
self.top_dir = tempfile.mkdtemp("ipa")
self.dir = os.path.join(self.top_dir, "realm_info")
- os.mkdir(self.dir, 0700)
+ os.mkdir(self.dir, 0o700)
try:
self.copy_ds_certificate()
@@ -475,7 +475,7 @@ class ReplicaPrepare(admintool.AdminTool):
ipautil.encrypt_file(
replicafile, encfile, self.dirman_password, self.top_dir)
- os.chmod(encfile, 0600)
+ os.chmod(encfile, 0o600)
installutils.remove_file(replicafile)