diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-07-15 16:38:06 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-07-31 15:22:19 +0200 |
commit | b8c46f2a32d0d8c2dc6ef0867f85f63cf076a004 (patch) | |
tree | 28e52d8fe2e3531e226d8c2249d6b7216f80bf48 /ipaserver/install/cainstance.py | |
parent | a908be2785d4388e3c97c7cd543c817c527d73c9 (diff) | |
download | freeipa-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/cainstance.py')
-rw-r--r-- | ipaserver/install/cainstance.py | 10 |
1 files changed, 5 insertions, 5 deletions
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): |