core: force inet_aton argument to string to prevent occasional error on reconnect.

it /should/ always be a string anyway, but sometimes things break with
a TypeError that it is an int instead of the expected string and hangs
up the bot.
This commit is contained in:
Daniel Folkinshteyn 2012-05-31 22:53:21 -04:00 committed by Valentin Lorentz
parent 643788b478
commit 2c051bab9f

View File

@ -114,7 +114,7 @@ def isIPV4(s):
0
"""
try:
return bool(socket.inet_aton(s))
return bool(socket.inet_aton(str(s)))
except socket.error:
return False