fix commit to db

This commit is contained in:
ccppi 2024-07-22 12:56:38 +02:00
parent a96d4b59de
commit 8d59514ddf

View File

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