git-update: Fix some issues reported by pyflakes

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2016-08-02 00:47:17 +02:00
parent 12ab89b78c
commit 7a53ded5fe

View file

@ -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)