This commit is contained in:
Jack Robison 2017-10-31 12:18:55 -04:00
parent f7aa478b9b
commit cfd4a94450
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -103,8 +103,8 @@ def check_connection(server="lbry.io", port=80, timeout=2):
log.debug('Connection successful')
return True
except (socket.gaierror, socket.herror) as ex:
log.info("Failed to connect to %s:%s. Unable to resolve domain. Trying to bypass DNS",
server, port, exc_info=True)
log.warning("Failed to connect to %s:%s. Unable to resolve domain. Trying to bypass DNS",
server, port)
try:
server = "8.8.8.8"
port = 53
@ -112,14 +112,12 @@ def check_connection(server="lbry.io", port=80, timeout=2):
log.debug('Connection successful')
return True
except Exception as ex:
log.info(
"Failed to connect to %s:%s. Maybe the internet connection is not working",
server, port, exc_info=True)
log.error("Failed to connect to %s:%s. Maybe the internet connection is not working",
server, port)
return False
except Exception as ex:
log.info(
"Failed to connect to %s:%s. Maybe the internet connection is not working",
server, port, exc_info=True)
log.error("Failed to connect to %s:%s. Maybe the internet connection is not working",
server, port)
return False