aboutsummaryrefslogtreecommitdiff
path: root/app/tasks/importtasks.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-08-09 11:27:54 +0100
committerrubenwardy <rw@rubenwardy.com>2019-08-09 11:27:54 +0100
commit6ce495fcd3333bec966bf5b9d09ce1f52544a300 (patch)
tree4dad89197064d15801876aeb1289308400e714a4 /app/tasks/importtasks.py
parent776a3eff2aa9b06262e417c30f97dfda5af2a5b0 (diff)
downloadcheatdb-6ce495fcd3333bec966bf5b9d09ce1f52544a300.tar.xz
Fix crash on reading mod.conf from Githubv1.16.3
Diffstat (limited to 'app/tasks/importtasks.py')
-rw-r--r--app/tasks/importtasks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/tasks/importtasks.py b/app/tasks/importtasks.py
index 465e3c2..108f1b3 100644
--- a/app/tasks/importtasks.py
+++ b/app/tasks/importtasks.py
@@ -55,6 +55,9 @@ class GithubURLMaker:
def getScreenshotURL(self):
return self.baseUrl + "/screenshot.png"
+ def getModConfURL(self):
+ return self.baseUrl + "/mod.conf"
+
def getCommitsURL(self, branch):
return "https://api.github.com/repos/{}/{}/commits?sha={}" \
.format(self.user, self.repo, urllib.parse.quote_plus(branch))
@@ -346,7 +349,7 @@ def makeVCSReleaseFromGithub(id, branch, release, url):
try:
contents = urllib.request.urlopen(commitsURL).read().decode("utf-8")
commits = json.loads(contents)
- except urllib.error.HTTPError:
+ except HTTPError:
raise TaskError("Unable to get commits for Github repository. Either the repository or reference doesn't exist.")
if len(commits) == 0 or not "sha" in commits[0]: