Adding some logging statements

This commit is contained in:
drigato 2014-12-08 14:24:19 -05:00
parent 435c49da98
commit 687548ec68

View file

@ -73,7 +73,10 @@ class PypoFile(Thread):
url = media_item['download_url']
with open(dst, "wb") as handle:
self.logger.info("----------")
self.logger.info(url)
response = requests.get(url, auth=requests.auth.HTTPBasicAuth(username, ''), stream=True, verify=False)
self.logger.info(response)
if not response.ok:
raise Exception("%s - Error occurred downloading file" % response.status_code)