summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-07-15 16:38:06 +0200
committerJan Cholasta <jcholast@redhat.com>2015-07-31 15:22:19 +0200
commitb8c46f2a32d0d8c2dc6ef0867f85f63cf076a004 (patch)
tree28e52d8fe2e3531e226d8c2249d6b7216f80bf48 /ipalib
parenta908be2785d4388e3c97c7cd543c817c527d73c9 (diff)
downloadfreeipa-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 'ipalib')
-rw-r--r--ipalib/plugins/dns.py2
-rw-r--r--ipalib/plugins/trust.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index 512a653c3..1de3f16c2 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -2374,7 +2374,7 @@ class dnszone(DNSZoneBase):
label=_('SOA serial'),
doc=_('SOA record serial number'),
minvalue=1,
- maxvalue=4294967295L,
+ maxvalue=4294967295,
default_from=_create_zone_serial,
autofill=True,
),
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index faa8186ba..91ffaf7fe 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -334,7 +334,7 @@ def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
base_id = DEFAULT_RANGE_SIZE + (
pysss_murmur.murmurhash3(
dom_sid,
- len(dom_sid), 0xdeadbeefL
+ len(dom_sid), 0xdeadbeef
) % 10000
) * DEFAULT_RANGE_SIZE