From 0866367887b9dccb521856067a71922112e25aed Mon Sep 17 00:00:00 2001 From: Phyks Date: Mon, 30 Jun 2014 11:05:03 +0200 Subject: [PATCH] Fixed bool is not iterable if URL is not fetchable --- fetcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetcher.py b/fetcher.py index 690bbd1..4e9c08b 100644 --- a/fetcher.py +++ b/fetcher.py @@ -59,12 +59,12 @@ def download(url): return dl, contenttype except ValueError: tools.warning("Invalid URL") - return False + return False, None except requests.exceptions.RequestException: tools.warning("Unable to get "+url+" using proxy "+proxy+". It " + "may not be available.") continue - return False + return False, None isbn_re = re.compile(r'isbn[\s]?:?[\s]?((?:[0-9]{3}[ -]?)?[0-9]{1,5}[ -]?[0-9]{1,7}[ -]?[0-9]{1,6}[- ]?[0-9])',