summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dns/rdtypes/ANY/LOC.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py
index 64b50c9..55662e0 100644
--- a/dns/rdtypes/ANY/LOC.py
+++ b/dns/rdtypes/ANY/LOC.py
@@ -24,6 +24,8 @@ _pows = (1, 10, 100, 1000, 10000, 100000, 1000000, 10000000,
100000000, 1000000000, 10000000000)
def _exponent_of(what, desc):
+ if what == 0:
+ return 0
exp = None
for i in range(len(_pows)):
if what // _pows[i] == 0: