diff --git a/logpyle/runalyzer.py b/logpyle/runalyzer.py index 00782f8..e6242d6 100644 --- a/logpyle/runalyzer.py +++ b/logpyle/runalyzer.py @@ -533,7 +533,8 @@ def make_wrapped_db( if gather: db = auto_gather(filenames) else: - assert len(filenames) == 1, "Enable autogather to support multiple input files" + assert len(filenames) == 1, \ + "Enable autogather to support multiple input files" db = sqlite3.connect(filenames[0]) db.create_aggregate("stddev", 1, StdDeviation) # type: ignore[arg-type] db.create_aggregate("var", 1, Variance) diff --git a/logpyle/upgrade_db.py b/logpyle/upgrade_db.py index 31341e8..cb847cd 100644 --- a/logpyle/upgrade_db.py +++ b/logpyle/upgrade_db.py @@ -20,6 +20,7 @@ import logging import shutil import sqlite3 +from pickle import dumps logger = logging.getLogger(__name__) @@ -74,15 +75,13 @@ def upgrade_conn(conn: sqlite3.Connection) -> sqlite3.Connection: ADD run_id integer; """) - from pickle import dumps schema_version = 3 value = bytes(dumps(schema_version)) if gathered: conn.execute("UPDATE runs SET schema_version=3") - # conn.execute("UPDATE runs SET schema_version = ?", (value,)) else: - # conn.execute("UPDATE constants SET value=3 WHERE name='schema_version'") - conn.execute("UPDATE constants SET value = ? WHERE name='schema_version'", (value,)) + conn.execute("UPDATE constants SET value = ? WHERE name='schema_version'", + (value,)) return conn