summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dns/edns.py2
-rw-r--r--dns/entropy.py2
-rw-r--r--dns/name.py2
-rw-r--r--dns/rdtypes/ANY/LOC.py8
-rwxr-xr-xexamples/ddns.py14
-rwxr-xr-xexamples/reverse.py6
6 files changed, 17 insertions, 17 deletions
diff --git a/dns/edns.py b/dns/edns.py
index e52b6df..cf062d0 100644
--- a/dns/edns.py
+++ b/dns/edns.py
@@ -114,7 +114,7 @@ class GenericOption(Option):
from_wire = classmethod(from_wire)
def _cmp(self, other):
- return cmp(self.data, other.data)
+ return cmp(self.data, other.data)
_type_to_class = {
}
diff --git a/dns/entropy.py b/dns/entropy.py
index d380cf8..1ffbc7b 100644
--- a/dns/entropy.py
+++ b/dns/entropy.py
@@ -112,7 +112,7 @@ class EntropyPool(object):
else:
rand = self.random_8
max = 255
- return (first + size * rand() // (max + 1))
+ return (first + size * rand() // (max + 1))
pool = EntropyPool()
diff --git a/dns/name.py b/dns/name.py
index 9e17cdd..4cd48a1 100644
--- a/dns/name.py
+++ b/dns/name.py
@@ -562,7 +562,7 @@ def from_unicode(text, origin = root):
text = u''
if text:
if text == u'.':
- return Name(['']) # no Unicode "u" on this constant!
+ return Name(['']) # no Unicode "u" on this constant!
for c in text:
if escaping:
if edigits == 0:
diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py
index 6cc5521..73bf79e 100644
--- a/dns/rdtypes/ANY/LOC.py
+++ b/dns/rdtypes/ANY/LOC.py
@@ -231,26 +231,26 @@ class LOC(dns.rdata.Rdata):
t = tok.get_string()
if t[-1] == 'm':
t = t[0 : -1]
- altitude = float(t) * 100.0 # m -> cm
+ altitude = float(t) * 100.0 # m -> cm
token = tok.get().unescape()
if not token.is_eol_or_eof():
value = token.value
if value[-1] == 'm':
value = value[0 : -1]
- size = float(value) * 100.0 # m -> cm
+ size = float(value) * 100.0 # m -> cm
token = tok.get().unescape()
if not token.is_eol_or_eof():
value = token.value
if value[-1] == 'm':
value = value[0 : -1]
- hprec = float(value) * 100.0 # m -> cm
+ hprec = float(value) * 100.0 # m -> cm
token = tok.get().unescape()
if not token.is_eol_or_eof():
value = token.value
if value[-1] == 'm':
value = value[0 : -1]
- vprec = float(value) * 100.0 # m -> cm
+ vprec = float(value) * 100.0 # m -> cm
tok.get_eol()
return cls(rdclass, rdtype, latitude, longitude, altitude,
diff --git a/examples/ddns.py b/examples/ddns.py
index 84814b7..f351524 100755
--- a/examples/ddns.py
+++ b/examples/ddns.py
@@ -12,15 +12,15 @@
#
# E.g. on my systems I have this
#
-# #!/bin/sh
+# #!/bin/sh
#
-# DEVICE=$1
+# DEVICE=$1
#
-# if [ "X${DEVICE}" == "Xeth0" ]; then
-# IPADDR=`LANG= LC_ALL= ifconfig ${DEVICE} | grep 'inet addr' |
-# awk -F: '{ print $2 } ' | awk '{ print $1 }'`
-# /usr/local/sbin/ddns.py $IPADDR
-# fi
+# if [ "X${DEVICE}" == "Xeth0" ]; then
+# IPADDR=`LANG= LC_ALL= ifconfig ${DEVICE} | grep 'inet addr' |
+# awk -F: '{ print $2 } ' | awk '{ print $1 }'`
+# /usr/local/sbin/ddns.py $IPADDR
+# fi
#
# in /etc/ifup-local.
#
diff --git a/examples/reverse.py b/examples/reverse.py
index 8657bae..9de5a30 100755
--- a/examples/reverse.py
+++ b/examples/reverse.py
@@ -28,9 +28,9 @@ for filename in sys.argv[1:]:
relativize=False)
for (name, ttl, rdata) in zone.iterate_rdatas('A'):
try:
- reverse_map[rdata.address].append(name.to_text())
- except KeyError:
- reverse_map[rdata.address] = [name.to_text()]
+ reverse_map[rdata.address].append(name.to_text())
+ except KeyError:
+ reverse_map[rdata.address] = [name.to_text()]
keys = reverse_map.keys()
keys.sort(lambda a1, a2: cmp(dns.ipv4.inet_aton(a1), dns.ipv4.inet_aton(a2)))