Merge pull request #471 from hobarrera/online-dont-fail-when-offline

online module: Don't fail when offline
This commit is contained in:
enkore 2016-10-18 01:18:32 +02:00 committed by GitHub
commit 10416e8ed0

View File

@ -373,7 +373,7 @@ class internet:
try:
socket.create_connection(cls.address, 1).close()
return True
except OSError:
except (OSError, socket.gaierror):
return False