mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
git-update: Fix some issues reported by pyflakes
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
12ab89b78c
commit
7a53ded5fe
1 changed files with 5 additions and 2 deletions
|
@ -167,11 +167,13 @@ def save_metadata(metadata, db, cur, user):
|
||||||
"PackageBaseID = %s AND UserID = %s",
|
"PackageBaseID = %s AND UserID = %s",
|
||||||
[pkgbase_id, user_id])
|
[pkgbase_id, user_id])
|
||||||
if cur.fetchone()[0] == 0:
|
if cur.fetchone()[0] == 0:
|
||||||
cur.execute("INSERT INTO PackageNotifications (PackageBaseID, UserID) " +
|
cur.execute("INSERT INTO PackageNotifications " +
|
||||||
"VALUES (%s, %s)", [pkgbase_id, user_id])
|
"(PackageBaseID, UserID) VALUES (%s, %s)",
|
||||||
|
[pkgbase_id, user_id])
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
|
||||||
def update_notify(db, cur, user, pkgbase_id):
|
def update_notify(db, cur, user, pkgbase_id):
|
||||||
# Obtain the user ID of the new maintainer.
|
# Obtain the user ID of the new maintainer.
|
||||||
cur.execute("SELECT ID FROM Users WHERE Username = %s", [user])
|
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.
|
# Execute the notification script.
|
||||||
subprocess.Popen((notify_cmd, 'update', str(user_id), str(pkgbase_id)))
|
subprocess.Popen((notify_cmd, 'update', str(user_id), str(pkgbase_id)))
|
||||||
|
|
||||||
|
|
||||||
def die(msg):
|
def die(msg):
|
||||||
sys.stderr.write("error: {:s}\n".format(msg))
|
sys.stderr.write("error: {:s}\n".format(msg))
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue