Fix update

This commit is contained in:
AKFish
2013-08-22 07:45:27 +08:00
parent 5b09f6c821
commit 70a7e9c83d
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
################################################################################
def get(dic, key):
if key in dic:
return key[dic]
return dic[key]
return None
+3 -3
View File
@@ -177,7 +177,7 @@ class Requester:
self.DEBUG_ON_RESPONSE(status, responseHeaders, output)
if status == 304:
raise GithubException.NotModifiedException(sttatus, output)
raise GithubException.NotModifiedException(status, output)
if status >= 400:
raise self.__createException(status, output)
return responseHeaders, output
@@ -282,8 +282,8 @@ class Requester:
requestHeaders["Authorization"] = self.__authorizationHeader
def __conditional(self, requestHeaders, parameters):
etag = Consts.get(requestHeaders, Consts.REQ_IF_NONE_MATCH)
last_modified = Consts.get(requestHeaders, Consts.REQ_IF_MODIFIED_SINCE)
etag = Consts.get(parameters, Consts.REQ_IF_NONE_MATCH)
last_modified = Consts.get(parameters, Consts.REQ_IF_MODIFIED_SINCE)
if etag is not None:
requestHeaders[Consts.REQ_IF_NONE_MATCH] = etag
del parameters[Consts.REQ_IF_NONE_MATCH]