mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-25 15:31:37 +01:00
Fix unexpected crash on bad Github URL
This commit is contained in:
parent
18b9fb3876
commit
04e8ae5bdd
@ -29,6 +29,10 @@ from app.utils import randomString
|
|||||||
|
|
||||||
class GithubURLMaker:
|
class GithubURLMaker:
|
||||||
def __init__(self, url):
|
def __init__(self, url):
|
||||||
|
self.baseUrl = None
|
||||||
|
self.user = None
|
||||||
|
self.repo = None
|
||||||
|
|
||||||
# Rewrite path
|
# Rewrite path
|
||||||
import re
|
import re
|
||||||
m = re.search("^\/([^\/]+)\/([^\/]+)\/?$", url.path)
|
m = re.search("^\/([^\/]+)\/([^\/]+)\/?$", url.path)
|
||||||
|
Loading…
Reference in New Issue
Block a user