mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
git-serve: Use pkgbase
for errors about invalid names
`repo` is not defined at the point it's used, so you would get errors like > Traceback (most recent call last): > File "/srv/http/vhosts/aur-dev.archlinux.org/public/git-interface/git-serve.py", line 138, in <module> > die('%s: invalid repository name: %s' % (action, repo)) > NameError: name 'repo' is not defined Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
608d4aaf57
commit
d5beada7c3
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ if action == 'git-upload-pack' or action == 'git-receive-pack':
|
||||||
die('%s: invalid path: %s' % (action, path))
|
die('%s: invalid path: %s' % (action, path))
|
||||||
pkgbase = path[1:-4]
|
pkgbase = path[1:-4]
|
||||||
if not re.match(repo_regex, pkgbase):
|
if not re.match(repo_regex, pkgbase):
|
||||||
die('%s: invalid repository name: %s' % (action, repo))
|
die('%s: invalid repository name: %s' % (action, pkgbase))
|
||||||
|
|
||||||
if not pkgbase_exists(pkgbase):
|
if not pkgbase_exists(pkgbase):
|
||||||
create_pkgbase(pkgbase, user)
|
create_pkgbase(pkgbase, user)
|
||||||
|
|
Loading…
Add table
Reference in a new issue