From 8d59514ddf10f8d4f566892bbc149c822277fc89 Mon Sep 17 00:00:00 2001 From: ccppi Date: Mon, 22 Jul 2024 12:56:38 +0200 Subject: [PATCH] fix commit to db --- lib/db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/db.py b/lib/db.py index f8da2dd..50252c7 100644 --- a/lib/db.py +++ b/lib/db.py @@ -116,9 +116,9 @@ def isStillValid(file): print("link is no valid URL so remove item") print("error: ",e) isLink = False - except RelativeURIError: + except httplib2.error.RelativeURIError: isLink = False - print("Not a valid link") + print("RelativeURIError: Not a valid link") rm_cursor = connection.cursor() rm_itm = rm_cursor.execute(f"""DELETE from jobs WHERE link = ?;""",(row[0],)) finally: @@ -134,3 +134,4 @@ def isStillValid(file): rm_cursor = connection.cursor() rm_itm = rm_cursor.execute(f"""DELETE from jobs WHERE link = ?;""",(row[0],)) print ("Deletion resultet in: ", rm_itm) + print("result of commit: ", connection.commit())