Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Hermes
Summary Lists News SCM
authorAndrew Flegg <andrew@bleb.org>
Thu, 10 Jun 2010 13:40:24 +0000 (14:40 +0100)
committerAndrew Flegg <andrew@bleb.org>
Thu, 10 Jun 2010 13:40:24 +0000 (14:40 +0100)
package/src/org/maemo/hermes/engine/twitter/service.py

index 7e01452..102acd9 100644 (file)
@@ -78,7 +78,15 @@ class Service(org.maemo.hermes.engine.service.Service):
 
     # -----------------------------------------------------------------------
     def _get_tweeters(self):
-        return self._twitter.GetFriends()
+        try:
+            return self._twitter.GetFriends()
+        except urllib2.HTTPError, e:
+            if e.code >= 500 and e.code <= 599:
+                print "Twitter down (fail whale): " + e.message
+                return []
+            else:
+                raise e
+        
     
     
     # -----------------------------------------------------------------------

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment