Do not crash in case of connection failure
Return None to indicate a network failure.
This commit is contained in:
parent
cf2115b383
commit
f12e35fef9
@ -51,8 +51,11 @@ def check_latest_version():
|
|||||||
Heavely dependent on server and server configurations
|
Heavely dependent on server and server configurations
|
||||||
not granted to work forever.'''
|
not granted to work forever.'''
|
||||||
connection = http.client.HTTPConnection('feedback-ltworf.appspot.com')
|
connection = http.client.HTTPConnection('feedback-ltworf.appspot.com')
|
||||||
|
try:
|
||||||
connection.request("GET", "/version/relational")
|
connection.request("GET", "/version/relational")
|
||||||
r = connection.getresponse()
|
r = connection.getresponse()
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
|
||||||
# html
|
# html
|
||||||
s = r.read()
|
s = r.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user