Skip to content
Snippets Groups Projects
Commit 5a2ee8c3 authored by Jonas Leder's avatar Jonas Leder
Browse files

Added exception, if fails

parent 827c75f0
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,7 @@ with sqlite3.connect('db/urls.db') as conn:
cursor = conn.cursor()
try: #Try making the database structure, if succeeded, exit, because there can't be any data.
cursor.execute(create_table)
print("No data Found, exiting")
exit()
raise Exception('No database Found', "Can't find the database ==> No data to export")
except sqlite3.OperationalError:
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment