From b8c46f2a32d0d8c2dc6ef0867f85f63cf076a004 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 15 Jul 2015 16:38:06 +0200 Subject: 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 --- contrib/RHEL4/ipachangeconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/RHEL4/ipachangeconf.py b/contrib/RHEL4/ipachangeconf.py index 87b306f5d..ac7ecf891 100644 --- a/contrib/RHEL4/ipachangeconf.py +++ b/contrib/RHEL4/ipachangeconf.py @@ -401,7 +401,7 @@ class IPAChangeConf: #Do not catch an unexisting file error, we want to fail in that case shutil.copy2(file, file+".ipabkp") - f = openLocked(file, 0644) + f = openLocked(file, 0o644) oldopts = self.parse(f) @@ -440,7 +440,7 @@ class IPAChangeConf: # The orign file did not exist pass - f = openLocked(file, 0644) + f = openLocked(file, 0o644) # Trunkate f.seek(0) -- cgit