summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/dsinstance.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/dsinstance.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/dsinstance.py')
-rw-r--r--ipaserver/install/dsinstance.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index d561ca5b6..f7360f5b4 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -425,7 +425,7 @@ class DsInstance(service.Service):
base_fd.close()
# Must be readable for dirsrv
- os.chmod(target_fname, 0440)
+ os.chmod(target_fname, 0o440)
os.chown(target_fname, pent.pw_uid, pent.pw_gid)
inf_txt = ipautil.template_str(INF_TEMPLATE, self.sub_dict)
@@ -463,7 +463,7 @@ class DsInstance(service.Service):
for schema_fname in IPA_SCHEMA_FILES:
target_fname = schema_dirname(self.serverid) + schema_fname
shutil.copyfile(ipautil.SHARE_DIR + schema_fname, target_fname)
- os.chmod(target_fname, 0440) # read access for dirsrv user/group
+ os.chmod(target_fname, 0o440) # read access for dirsrv user/group
os.chown(target_fname, pent.pw_uid, pent.pw_gid)
try:
@@ -472,7 +472,7 @@ class DsInstance(service.Service):
target_fname = schema_dirname(self.serverid) + "05rfc2247.ldif"
shutil.copyfile(ipautil.SHARE_DIR + "05rfc2247.ldif", target_fname)
- os.chmod(target_fname, 0440)
+ os.chmod(target_fname, 0o440)
os.chown(target_fname, pent.pw_uid, pent.pw_gid)
except IOError:
# Does not apply with newer DS releases