summaryrefslogtreecommitdiff
path: root/community/gwibber/lp_934530.patch
blob: 6f2bd430278d436cd2b859921cf1ed94b07f0f7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
=== modified file 'gwibber/microblog/network.py'
--- old/gwibber/microblog/network.py	2012-03-31 15:02:54 +0000
+++ new/gwibber/microblog/network.py	2012-06-13 16:48:52 +0000
@@ -37,8 +37,14 @@
       logger.error("HTTP Error for %s - error code: %s", e.geturl().split("?")[0], e.getcode())
       self.res = "HTTP error: {0}".format(e.getcode())
     except urllib2.URLError, e:
-      logger.error("Network failure: %s", e.reason)
-      self.res = "Network error: {0}".format(e.reason)
+      logger.error("Network failure: %s", e.message)
+      self.res = "Network error: {0}".format(e.message)
+    except IOError, e:
+      logger.error("Network failure: %s", e.message)
+      self.res = "Network error: {0}".format(e.message)
+    except:
+      logger.error("Network failure: UNKNOWN")
+      self.res = "Network error: UNKNOWN"
 
   def get_json(self):
     try: