From: Antonio Ospite Date: Thu, 9 Jul 2015 15:15:28 +0000 (+0200) Subject: winfreed.py: print also errors with no reason or code attribute X-Git-Url: https://git.ao2.it/winfreed.git/commitdiff_plain/353479294b9eb7e2163dabb659aa1ad1010f7afa?ds=sidebyside winfreed.py: print also errors with no reason or code attribute --- diff --git a/winfreed.py b/winfreed.py index d25a75f..b58358c 100755 --- a/winfreed.py +++ b/winfreed.py @@ -76,6 +76,8 @@ def download_file(src_url, dest_dir): print 'Reason: ', e.reason elif hasattr(e, 'code'): print 'Error code: ', e.code + else: + print e return # get the final URL after possible redirect have been followed