summaryrefslogtreecommitdiffstats
path: root/git-interface
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-08-02 00:47:17 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-08-05 01:22:51 +0200
commit7a53ded5fea71cc89d0530d5c087e452e89c9d3f (patch)
treeee7ed21b57bfa6ee0b039cc481cf67412d263e2c /git-interface
parent12ab89b78c51fcd7b2b73049ac78922c9b238cc5 (diff)
downloadaurweb-7a53ded5fea71cc89d0530d5c087e452e89c9d3f.tar.xz
git-update: Fix some issues reported by pyflakes
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'git-interface')
-rwxr-xr-xgit-interface/git-update.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-interface/git-update.py b/git-interface/git-update.py
index 41b38a6..5fc5562 100755
--- a/git-interface/git-update.py
+++ b/git-interface/git-update.py
@@ -167,11 +167,13 @@ def save_metadata(metadata, db, cur, user):
"PackageBaseID = %s AND UserID = %s",
[pkgbase_id, user_id])
if cur.fetchone()[0] == 0:
- cur.execute("INSERT INTO PackageNotifications (PackageBaseID, UserID) " +
- "VALUES (%s, %s)", [pkgbase_id, user_id])
+ cur.execute("INSERT INTO PackageNotifications " +
+ "(PackageBaseID, UserID) VALUES (%s, %s)",
+ [pkgbase_id, user_id])
db.commit()
+
def update_notify(db, cur, user, pkgbase_id):
# Obtain the user ID of the new maintainer.
cur.execute("SELECT ID FROM Users WHERE Username = %s", [user])
@@ -180,6 +182,7 @@ def update_notify(db, cur, user, pkgbase_id):
# Execute the notification script.
subprocess.Popen((notify_cmd, 'update', str(user_id), str(pkgbase_id)))
+
def die(msg):
sys.stderr.write("error: {:s}\n".format(msg))
exit(1)