mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 07:52:35 +03:00
Extra http resilience in checkupdates
This commit is contained in:
parent
785e17428a
commit
bd46fcfa99
1 changed files with 1 additions and 1 deletions
|
@ -173,6 +173,7 @@ def check_market(app):
|
||||||
req = urllib2.Request(url, None, headers)
|
req = urllib2.Request(url, None, headers)
|
||||||
try:
|
try:
|
||||||
resp = urllib2.urlopen(req, None, 20)
|
resp = urllib2.urlopen(req, None, 20)
|
||||||
|
page = resp.read()
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
if e.code == 404:
|
if e.code == 404:
|
||||||
return (None, 'Not in market')
|
return (None, 'Not in market')
|
||||||
|
@ -180,7 +181,6 @@ def check_market(app):
|
||||||
return (None, 'Failed with HTTP status' + str(req.getcode()))
|
return (None, 'Failed with HTTP status' + str(req.getcode()))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
return (None, 'Failed:' + str(e))
|
return (None, 'Failed:' + str(e))
|
||||||
page = resp.read()
|
|
||||||
|
|
||||||
version = None
|
version = None
|
||||||
vercode = None
|
vercode = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue