add timeouts and improve single instance handling. Fixes #638 #693

This commit is contained in:
clinton-hall 2015-01-30 13:17:18 +10:30
commit 8570a6bfc8
7 changed files with 28 additions and 24 deletions

View file

@ -58,7 +58,7 @@ class autoProcessComics:
logger.debug("Opening URL: %s" % (url), section)
try:
r = requests.get(url, auth=(username, password), params=params, stream=True, verify=False)
r = requests.get(url, auth=(username, password), params=params, stream=True, verify=False, timeout=(30, 300))
except requests.ConnectionError:
logger.error("Unable to open URL", section)
return [1, "%s: Failed to post-process - Unable to connect to %s" % (section, section) ]