diff options
Diffstat (limited to 'scripts/git-integration/git-serve.py')
-rwxr-xr-x | scripts/git-integration/git-serve.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py index e6216773..0cad176c 100755 --- a/scripts/git-integration/git-serve.py +++ b/scripts/git-integration/git-serve.py @@ -15,6 +15,7 @@ aur_db_host = config.get('database', 'host') aur_db_name = config.get('database', 'name') aur_db_user = config.get('database', 'user') aur_db_pass = config.get('database', 'password') +aur_db_socket = config.get('database', 'socket') repo_base_path = config.get('serve', 'repo-base') repo_regex = config.get('serve', 'repo-regex') @@ -40,7 +41,8 @@ def setup_repo(repo, user): die('invalid repository name: %s' % (repo)) db = mysql.connector.connect(host=aur_db_host, user=aur_db_user, - passwd=aur_db_pass, db=aur_db_name) + passwd=aur_db_pass, db=aur_db_name, + unix_socket=aur_db_socket) cur = db.cursor() cur.execute("SELECT COUNT(*) FROM PackageBases WHERE Name = %s ", [repo]) @@ -66,7 +68,7 @@ def setup_repo(repo, user): def check_permissions(pkgbase, user): db = mysql.connector.connect(host=aur_db_host, user=aur_db_user, passwd=aur_db_pass, db=aur_db_name, - buffered=True) + unix_socket=aur_db_socket, buffered=True) cur = db.cursor() cur.execute("SELECT COUNT(*) FROM PackageBases INNER JOIN Users " + |