VMM/network: Post-2to3 fix. s/addr.encode('hex')/b2a_hex(addr).
--- a/VirtualMailManager/network.py Sun Dec 30 18:13:56 2012 +0000
+++ b/VirtualMailManager/network.py Sat Jan 05 18:23:05 2013 +0000
@@ -10,6 +10,8 @@
import socket
+from binascii import b2a_hex
+
class NetInfo(object):
"""Simple class for CIDR network addresses an IP addresses."""
@@ -97,4 +99,4 @@
address = socket.inet_pton(family, ip_address)
except socket.error:
raise ValueError('Not a valid IPv6 address: %r' % ip_address)
- return (family, int(address.encode('hex'), 16))
+ return (family, int(b2a_hex(address), 16))