mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
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. Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
aa4071fa68
commit
6025f7364c
@ -73,7 +73,7 @@ def isIPV4(s):
|
|||||||
0
|
0
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return bool(socket.inet_aton(s))
|
return bool(socket.inet_aton(str(s)))
|
||||||
except socket.error:
|
except socket.error:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user