8000 Skip objects iterated over that are None · chaporgin/github3.py@1c5e1a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c5e1a1

Browse files
committed
Skip objects iterated over that are None
Fixes sigmavirus24#304 Fixes sigmavirus24#305
1 parent e2a129a commit 1c5e1a1

File tree

8000

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

github3/structs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def __iter__(self):
7979
json = json.items()
8080

8181
for i in json:
82+
if i is None: # Temporary fix for GitHub Enterprise and #304
83+
continue
8284
yield cls(i, self) if issubclass(cls, GitHubCore) else cls(i)
8385
self.count -= 1 if self.count > 0 else 0
8486
if self.count == 0:

0 commit comments

Comments
 (0)
0