diff --git a/safaribooks.py b/safaribooks.py old mode 100644 new mode 100755 index e6fdf14..4146ef3 --- a/safaribooks.py +++ b/safaribooks.py @@ -854,6 +854,7 @@ class SafariBooks: response = self.requests_provider(urljoin(SAFARI_BASE_URL, url), stream=True) if response == 0: self.display.error("Error trying to retrieve this image: %s\n From: %s" % (image_name, url)) + return with open(image_path, 'wb') as img: for chunk in response.iter_content(1024):