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 /ipapython/certmonger.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 'ipapython/certmonger.py')
-rw-r--r-- | ipapython/certmonger.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipapython/certmonger.py b/ipapython/certmonger.py index b37676872..3a2907d83 100644 --- a/ipapython/certmonger.py +++ b/ipapython/certmonger.py @@ -493,7 +493,7 @@ def dogtag_start_tracking(ca, nickname, pin, pinfile, secdir, pre_command, params['KEY_PIN_FILE'] = os.path.abspath(pinfile) if pre_command: if not os.path.isabs(pre_command): - if sys.maxsize > 2**32L: + if sys.maxsize > 2**32: libpath = 'lib64' else: libpath = 'lib' @@ -501,7 +501,7 @@ def dogtag_start_tracking(ca, nickname, pin, pinfile, secdir, pre_command, params['cert-presave-command'] = pre_command if post_command: if not os.path.isabs(post_command): - if sys.maxsize > 2**32L: + if sys.maxsize > 2**32: libpath = 'lib64' else: libpath = 'lib' |