From 804fc10f1d15becad3c94a2b4f9256e591926504 Mon Sep 17 00:00:00 2001 From: "Bora M. Alper" Date: Thu, 15 Jun 2017 15:49:41 +0300 Subject: [PATCH] fixed "sqlite3.ProgrammingError: Cannot operate on a closed database." p.c. you should stop running what is using the database before closing it! --- magneticod/magneticod/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magneticod/magneticod/__main__.py b/magneticod/magneticod/__main__.py index fa0c62d..a99dbdd 100644 --- a/magneticod/magneticod/__main__.py +++ b/magneticod/magneticod/__main__.py @@ -151,8 +151,8 @@ def main() -> int: logging.critical("Keyboard interrupt received! Exiting gracefully...") finally: metadata_queue_watcher_task.cancel() - database.close() loop.run_until_complete(node.shutdown()) + database.close() return 0