diff options
author | Bob Halley <halley@dnspython.org> | 2014-03-03 08:57:35 -0800 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2014-03-03 08:57:58 -0800 |
commit | f80e6392aeb863adefe283d8cc7066d9d8dc3d09 (patch) | |
tree | 660c5a3df7b610202585f8a1c3a264c02ba2e9be /dns | |
parent | 0b2b985c0b4b0781ddafe74ec435362a026ebf63 (diff) | |
download | dnspython-f80e6392aeb863adefe283d8cc7066d9d8dc3d09.tar.gz |
In LOC, deal with 0 values for size, horizontal precision, and vertical precision.
Diffstat (limited to 'dns')
-rw-r--r-- | dns/rdtypes/ANY/LOC.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py index 863c184..6266ae6 100644 --- a/dns/rdtypes/ANY/LOC.py +++ b/dns/rdtypes/ANY/LOC.py @@ -28,6 +28,8 @@ _default_hprec = 1000000.0 _default_vprec = 1000.0 def _exponent_of(what, desc): + if what == 0: + return 0 exp = None for i in xrange(len(_pows)): if what // _pows[i] == 0L: |