Revision 5160
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/tnrs.py | ||
---|---|---|
189 | 189 |
def repeated_tnrs_request(names, debug=False, **kw_args): |
190 | 190 |
for try_num in xrange(2): |
191 | 191 |
try: return tnrs_request(names, debug, **kw_args) |
192 |
except InvalidResponse, e:
|
|
192 |
except (urllib2.HTTPError, InvalidResponse), e:
|
|
193 | 193 |
exc.print_ex(e, detail=False) |
194 | 194 |
debug = True |
195 | 195 |
# try again with debug turned on |
Also available in: Unified diff
tnrs.py: repeated_tnrs_request(): Also retry request in debug mode if an HTTPError is thrown, so that debugging info can also be obtained if there is a bug in the TNRS client