diff options
author | Bob Halley <halley@dnspython.org> | 2020-08-08 07:21:37 -0700 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2020-08-08 07:21:37 -0700 |
commit | 86ddcfd4eac493f0bcd38a824952e70567e4886b (patch) | |
tree | bc2cfc9529b3caeb75db46e077dba17e796e9e0b | |
parent | 89d7e549b07646cc1cd1a84b0fb943722e2700fb (diff) | |
download | dnspython-86ddcfd4eac493f0bcd38a824952e70567e4886b.tar.gz |
LOC _exponent_of does not need to do division.
-rw-r--r-- | dns/rdtypes/ANY/LOC.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py index f3e3e12..c9e985b 100644 --- a/dns/rdtypes/ANY/LOC.py +++ b/dns/rdtypes/ANY/LOC.py @@ -34,17 +34,13 @@ _MIN_LATITUDE = 0x80000000 - 90 * 3600000 _MAX_LONGITUDE = 0x80000000 + 180 * 3600000 _MIN_LONGITUDE = 0x80000000 - 180 * 3600000 -# pylint complains about division since we don't have a from __future__ for -# it, but we don't care about python 2 warnings, so turn them off. -# -# pylint: disable=old-division def _exponent_of(what, desc): if what == 0: return 0 exp = None for (i, pow) in enumerate(_pows): - if what // pow == 0: + if what < pow: exp = i - 1 break if exp is None or exp < 0: |