summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2013-11-27 15:07:43 +0000
committerNathan Kinkade <nath@nkinka.de>2013-11-27 15:07:43 +0000
commit9f8359ad6ef3dbd967c1d4c0a5376432aaf3ab0a (patch)
tree0ed68b91fba1a6eb9f8452c7ecdfb011a6c0b4d6
parent544fd291b0f19012bee24b57cd3ccc1924deab8e (diff)
Apparently e.code for HTTPError is an interger, not a string.
-rwxr-xr-xmiami_dade_clerk_courts.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/miami_dade_clerk_courts.py b/miami_dade_clerk_courts.py
index 709f783..d9b0459 100755
--- a/miami_dade_clerk_courts.py
+++ b/miami_dade_clerk_courts.py
@@ -141,7 +141,7 @@ def fetch_page(post_fields):
logging.error('%s: urllib2 error reason: %s' % (current_case, e.reason))
if hasattr(e, 'code'):
logging.error('%s: urllib2 error code: %s' % (current_case, e.code))
- if e.code == '500':
+ if e.code == 500:
sleeptime = 2 ** attempt * 10
time.sleep(sleeptime)
logging.error('%s: Trying again after sleeping for %d seconds' % (current_case, sleeptime))