style fixes

This commit is contained in:
Lili (Tlapka) 2022-11-22 11:33:05 +01:00
parent 5d3a4c3825
commit 5e5e81114f
4 changed files with 6 additions and 7 deletions

View File

@ -55,6 +55,7 @@ def read_all_users_with_username(db, username):
print("Error occured reading points from username:", e.args[0]) print("Error occured reading points from username:", e.args[0])
print("To user:", username) print("To user:", username)
def give_points_to_user(db, user_id, points): def give_points_to_user(db, user_id, points):
try: try:
db.execute( db.execute(
@ -108,7 +109,7 @@ def add_user_to_database(db, user_id, display_name):
"INSERT INTO points(id, name, points) VALUES(?, ?, 10)", "INSERT INTO points(id, name, points) VALUES(?, ?, 10)",
(user_id, display_name) (user_id, display_name)
) )
if user is not None and user[1] == None: if user is not None and user[1] is None:
cursor.execute( cursor.execute(
"""UPDATE points """UPDATE points
SET name = ? SET name = ?
@ -157,8 +158,6 @@ def add_to_redeem_queue(db, user_id, redeem_name, note=None):
print("To user:", user_id, " with redeem:", redeem_name, "with note:", note) print("To user:", user_id, " with redeem:", redeem_name, "with note:", note)
def all_counters(db): def all_counters(db):
try: try:
cursor = db.execute( cursor = db.execute(