File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def latest_sha(self, differs_from=''):
44
44
See: https://git.io/vaqIw
45
45
46
46
:param differs_from string: (optional), sha to compare against
47
- :returns: strring of the SHA or None
47
+ :returns: string of the SHA or None
48
48
"""
49
49
# If-None-Match returns 200 instead of 304 value does not have quotes
50
50
headers = {
@@ -54,9 +54,9 @@ def latest_sha(self, differs_from=''):
54
54
base = self ._api .split ('/branches' , 1 )[0 ]
55
55
url = self ._build_url ('commits' , self .name , base_url = base )
56
56
resp = self ._get (url , headers = headers )
57
- if resp :
58
- sha = None if self . _boolean ( resp , 304 , 200 ) else resp .content
59
- return sha
57
+ if self . _boolean ( resp , 200 , 304 ) :
58
+ return resp .content
59
+ return None
60
60
61
61
def protect (self , enforcement = None , status_checks = None ):
62
62
"""Enable force push protection and configure status check enforcement.
You can’t perform that action at this time.
0 commit comments