Handle both a trailing and non-trailing '/' in source paths

This commit is contained in:
AndyGrant committed 2020-03-19 12:33:57 -04:00
1 parent cc288cae93
commit 753242948b
2 files changed
+27 -4

No files matched your search

+2 -1
View File
@@ -192,7 +192,8 @@ def getBranchInformation(repo, branch, errors):
try:
data = requests.get(target.rstrip('/')).json()
treesha = data['commit']['commit']['tree']['sha']
return (data['commit']['sha'], pathjoin(repo, 'archive', treesha, '.zip'))
source = pathjoin(repo, 'archive', treesha + '.zip').rstrip('/')
return (data['commit']['sha'], source)
except:
errors.append("Branch {0} could not be found".format(branch))