chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6752665
)
Don't hang or crash in checkupdates
author
Ciaran Gultnieks
<ciaran@ciarang.com>
Fri, 31 May 2013 06:50:21 +0000
(07:50 +0100)
committer
Ciaran Gultnieks
<ciaran@ciarang.com>
Fri, 31 May 2013 06:50:21 +0000
(07:50 +0100)
fdroidserver/checkupdates.py
patch
|
blob
|
history
diff --git
a/fdroidserver/checkupdates.py
b/fdroidserver/checkupdates.py
index 713ad6bd0553eb9621450a94eb043c2deb0be893..282471b00e635f51bb802afbaf60fdaf6c795f99 100644
(file)
--- a/
fdroidserver/checkupdates.py
+++ b/
fdroidserver/checkupdates.py
@@
-173,7
+173,7
@@
def check_market(app):
headers = {'User-Agent' : 'Mozilla/5.0 (X11; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0'}
req = urllib2.Request(url, None, headers)
try:
- resp = urllib2.urlopen(req)
+ resp = urllib2.urlopen(req
, None, 20
)
except urllib2.HTTPError, e:
if e.code == 404:
return (None, 'Not in market')
@@
-182,6
+182,8
@@
def check_market(app):
sys.exit(1)
else:
return (None, 'Failed with HTTP status' + str(req.getcode()))
+ except Exception, e:
+ return (None, 'Failed:' + str(e))
page = resp.read()
version = None