mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Review of #189: use dict.get
http://docs.python.org/2/library/stdtypes.html#dict.get
This commit is contained in:
@@ -27,13 +27,12 @@
|
||||
from __future__ import with_statement
|
||||
|
||||
import datetime
|
||||
|
||||
import GithubException
|
||||
|
||||
import pickle
|
||||
|
||||
import GithubException
|
||||
import Consts
|
||||
|
||||
|
||||
class _NotSetType:
|
||||
def __repr__(self):
|
||||
return "NotSet"
|
||||
@@ -126,14 +125,14 @@ class GithubObject(object):
|
||||
'''
|
||||
:type str
|
||||
'''
|
||||
return Consts.get(self._headers, Consts.RES_ETAG)
|
||||
return self._headers.get(Consts.RES_ETAG)
|
||||
|
||||
@property
|
||||
def last_modified(self):
|
||||
'''
|
||||
:type str
|
||||
'''
|
||||
return Consts.get(self._headers, Consts.RES_LAST_MODIFED)
|
||||
return self._headers.get(Consts.RES_LAST_MODIFED)
|
||||
|
||||
|
||||
def update(self):
|
||||
|
||||
Reference in New Issue
Block a user