Commits

Maciej Fijalkowski committed 7a39bbe

hopefully this is the last special case for errors

Comments (0)

Files changed (1)

             response += '  Reason: ' + str(e.reason)
         elif hasattr(e, 'code'):
             response = '\n  The server couldn\'t fulfill the request'
-        response = "".join([response] + e.readlines())
+        if hasattr(e, 'readlines'):
+            response = "".join([response] + e.readlines())
         print response
         with open('error.html', 'w') as error_file:
             error_file.write(response)