From d5beada7c36529dd5f1ef500e2bbb4dcdcc0336a Mon Sep 17 00:00:00 2001 From: Wieland Hoffmann Date: Mon, 8 Jun 2015 11:49:38 +0200 Subject: 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 > die('%s: invalid repository name: %s' % (action, repo)) > NameError: name 'repo' is not defined Signed-off-by: Lukas Fleischer --- git-interface/git-serve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-interface/git-serve.py b/git-interface/git-serve.py index 5aa44c3..cfd3e34 100755 --- a/git-interface/git-serve.py +++ b/git-interface/git-serve.py @@ -135,7 +135,7 @@ if action == 'git-upload-pack' or action == 'git-receive-pack': die('%s: invalid path: %s' % (action, path)) pkgbase = path[1:-4] 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): create_pkgbase(pkgbase, user) -- cgit v1.2.3-54-g00ecf