Merge branch '952' into upstream-v0.6

This commit is contained in:
Peter Šurda 2018-03-22 16:16:24 +01:00
commit 55d6239e3d
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -100,7 +100,10 @@ def checkIPAddress(host, private=False):
return False
return hostStandardFormat
else:
hostStandardFormat = socket.inet_ntop(socket.AF_INET6, host)
try:
hostStandardFormat = socket.inet_ntop(socket.AF_INET6, host)
except ValueError:
return False
if hostStandardFormat == "":
# This can happen on Windows systems which are not 64-bit compatible
# so let us drop the IPv6 address.