Skip to content

Commit 99ccfa6

Browse files
committed
Fix bug when parsing Lists.
1 parent edb63d2 commit 99ccfa6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tweepy/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ def parse(cls, api, json):
257257
@classmethod
258258
def parse_list(cls, api, json_list, result_set=None):
259259
results = ResultSet()
260-
for obj in json_list['lists']:
260+
if isinstance(json_list, dict):
261+
json_list = json_list['lists']
262+
for obj in json_list:
261263
results.append(cls.parse(api, obj))
262264
return results
263265

0 commit comments

Comments
 (0)