Ignore leading/trailing whitespace parsing IP6 addresses.

This commit is contained in:
Stuart Gathman
2012-07-13 21:50:52 +00:00
parent 16bfe5d4da
commit 04a241f1e9
+1 -1
View File
@@ -49,7 +49,7 @@ if hasattr(socket,'has_ipv6') and socket.has_ipv6:
def inet_ntop(s): def inet_ntop(s):
return socket.inet_ntop(socket.AF_INET6,s) return socket.inet_ntop(socket.AF_INET6,s)
def inet_pton(s): def inet_pton(s):
return socket.inet_pton(socket.AF_INET6,s) return socket.inet_pton(socket.AF_INET6,s.strip())
else: else:
from pyip6 import inet_ntop, inet_pton from pyip6 import inet_ntop, inet_pton