Fixed bool is not iterable if URL is not fetchable

This commit is contained in:
Phyks 2014-06-30 11:05:03 +02:00
parent 67611ab648
commit 0866367887

View File

@ -59,12 +59,12 @@ def download(url):
return dl, contenttype return dl, contenttype
except ValueError: except ValueError:
tools.warning("Invalid URL") tools.warning("Invalid URL")
return False return False, None
except requests.exceptions.RequestException: except requests.exceptions.RequestException:
tools.warning("Unable to get "+url+" using proxy "+proxy+". It " + tools.warning("Unable to get "+url+" using proxy "+proxy+". It " +
"may not be available.") "may not be available.")
continue 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])', 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])',