8000 Merge pull request #271 from pamelafox/patch-1 · christophelec/github3.py@78c437f · GitHub
[go: up one dir, main page]

Skip to content

Commit 78c437f

Browse files
committed
Merge pull request sigmavirus24#271 from pamelafox/patch-1
Also put json.get() in the "if json is not None" check
2 parents e09add9 + f748d7b commit 78c437f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

github3/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def __init__(self, json):
2929
if json is not None:
3030
self.etag = json.pop('ETag', None)
3131
self.last_modified = json.pop('Last-Modified', None)
32+
self._uniq = json.get('url', None)
3233
self._json_data = json
33-
self._uniq = json.get('url', None)
34-
34+
3535
def to_json(self):
3636
"""Return the json representing this object."""
3737
return self._json_data

0 commit comments

Comments
 (0)
0