Revision 5107
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/tnrs.py | ||
---|---|---|
5 | 5 |
import time |
6 | 6 |
import urllib2 |
7 | 7 |
|
8 |
import exc |
|
8 | 9 |
import streams |
9 | 10 |
|
10 | 11 |
# Config |
... | ... | |
134 | 135 |
def repeated_tnrs_request(taxons, debug=False, **kw_args): |
135 | 136 |
for try_num in xrange(max_tries): |
136 | 137 |
try: return tnrs_request(taxons, debug, **kw_args) |
137 |
except InvalidResponse: |
|
138 |
except InvalidResponse, e: |
|
139 |
exc.print_ex(e, detail=False) |
|
138 | 140 |
debug = True # next time, output protocol info for debugging |
139 | 141 |
# try again |
140 | 142 |
raise # error is not temporary |
Also available in: Unified diff
tnrs.py: tnrs_request(): repeated_tnrs_request(): Print all suppressed exceptions to stderr