winfreed.py: print also errors with no reason or code attribute
authorAntonio Ospite <ao2@ao2.it>
Thu, 9 Jul 2015 15:15:28 +0000 (17:15 +0200)
committerAntonio Ospite <ao2@ao2.it>
Thu, 9 Jul 2015 15:15:28 +0000 (17:15 +0200)
winfreed.py

index d25a75f..b58358c 100755 (executable)
@@ -76,6 +76,8 @@ def download_file(src_url, dest_dir):
             print 'Reason: ', e.reason
         elif hasattr(e, 'code'):
             print 'Error code: ', e.code
             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
         return
 
     # get the final URL after possible redirect have been followed