summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2013-11-28 00:43:37 +0000
committerNathan Kinkade <nath@nkinka.de>2013-11-28 00:43:37 +0000
commitc75e22d6ce2042a19bb44d34553be342ddcffbf0 (patch)
tree70b7683939600fb7dee01bffafcd7563cb3c2afe
parent9f8359ad6ef3dbd967c1d4c0a5376432aaf3ab0a (diff)
Just realized that these 500 http error codes could be because the base ASP variables have changed. Update them upon any 500 error.
-rwxr-xr-xmiami_dade_clerk_courts.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/miami_dade_clerk_courts.py b/miami_dade_clerk_courts.py
index d9b0459..7643e95 100755
--- a/miami_dade_clerk_courts.py
+++ b/miami_dade_clerk_courts.py
@@ -145,6 +145,9 @@ def fetch_page(post_fields):
sleeptime = 2 ** attempt * 10
time.sleep(sleeptime)
logging.error('%s: Trying again after sleeping for %d seconds' % (current_case, sleeptime))
+ # Reset base ASP vars just in case
+ set_asp_vars()
+ logging.error('%s: Also resetting ASP vars just in case.' % (current_case))
except:
logging.error('%s: fetch_page() exception %s - %s'
% (current_case, sys.exc_info()[0], sys.exc_info()[1]))