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