Fix for null twitter json objects.
authorJenny Loomis <jenny@rockmelt.com>
Tue, 24 Aug 2010 17:55:25 +0000 (10:55 -0700)
committerJosh Roesslein <jroesslein@gmail.com>
Tue, 31 Aug 2010 22:33:26 +0000 (17:33 -0500)
Don't die while waiting for fix to twitter api issue 1823: http://code.google.com/p/twitter-api/issues/detail?id=1823

tweepy/models.py

index e79eac994bf3a3864e09e6950c5d9a4fa9b8b799..b584fbc4019c9b8bd71e0f6eab3dc4bb944213b9 100644 (file)
@@ -35,7 +35,8 @@ class Model(object):
         """Parse a list of JSON objects into a result set of model instances."""
         results = ResultSet()
         for obj in json_list:
-            results.append(cls.parse(api, obj))
+            if obj:
+                results.append(cls.parse(api, obj))
         return results