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/certs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipaserver/install/certs.py') diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py index 564332e6f..e8084950e 100644 --- a/ipaserver/install/certs.py +++ b/ipaserver/install/certs.py @@ -293,7 +293,7 @@ class CertDB(object): /usr/lib[64]/ipa/certmonger. """ if command is not None and not os.path.isabs(command): - if sys.maxsize > 2**32L: + if sys.maxsize > 2**32: libpath = 'lib64' else: libpath = 'lib' @@ -647,7 +647,7 @@ class CertDB(object): def publish_ca_cert(self, location): shutil.copy(self.cacert_fname, location) - os.chmod(location, 0444) + os.chmod(location, 0o444) def export_pem_cert(self, nickname, location): return self.nssdb.export_pem_cert(nickname, location) -- cgit