mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
committed by
Jan Cholasta
parent
a908be2785
commit
b8c46f2a32
@@ -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,
|
||||
),
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user