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 --- ipaserver/install/cainstance.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ipaserver/install/cainstance.py') diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 5fd3017e1..c1fa1fc27 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -1090,9 +1090,9 @@ class CAInstance(DogtagInstance): raise RuntimeError("Unable to submit RA cert request") def fix_ra_perms(self): - os.chmod(self.ra_agent_db + "/cert8.db", 0640) - os.chmod(self.ra_agent_db + "/key3.db", 0640) - os.chmod(self.ra_agent_db + "/secmod.db", 0640) + os.chmod(self.ra_agent_db + "/cert8.db", 0o640) + os.chmod(self.ra_agent_db + "/key3.db", 0o640) + os.chmod(self.ra_agent_db + "/secmod.db", 0o640) pent = pwd.getpwnam("apache") os.chown(self.ra_agent_db + "/cert8.db", 0, pent.pw_gid ) @@ -1116,7 +1116,7 @@ class CAInstance(DogtagInstance): if not os.path.exists(publishdir): os.mkdir(publishdir) - os.chmod(publishdir, 0775) + os.chmod(publishdir, 0o775) pent = pwd.getpwnam(PKI_USER) os.chown(publishdir, 0, pent.pw_gid) @@ -1252,7 +1252,7 @@ class CAInstance(DogtagInstance): fd = open(location, "w+") fd.write(cert) fd.close() - os.chmod(location, 0444) + os.chmod(location, 0o444) def configure_certmonger_renewal(self): -- cgit