Skip to content
Snippets Groups Projects

#53 Fjern database-prints

Merged Anders H. Rebner requested to merge fjern-database-prints into master
1 file
+ 2
13
Compare changes
  • Side-by-side
  • Inline
+ 2
13
@@ -47,20 +47,11 @@ class Database:
self.db_path = db_path
db_exists = os.path.exists(self.db_path)
self.conn = sqlite3.connect(self.db_path)
if db_exists:
print("Connecting to existing DB.")
self.conn = sqlite3.connect(db_path)
print("DB-connection established.")
else:
print("Creating new DB.")
self.conn = sqlite3.connect(db_path)
if not db_exists:
self.create_tables()
print("DB created.")
self.fill_tables()
print("Tables filled with data.")
self.conn.row_factory = sqlite3.Row # Enables row["columnName"]
@@ -238,8 +229,6 @@ class Database:
# Save changes in db
self.conn.commit()
print("Code in Codebook updated")
def seconds_to_next_update(self, period):
"""
Return time to next update of Codebook in seconds.
Loading