diff --git a/gramps/cli/grampscli.py b/gramps/cli/grampscli.py index 23a538928..ac66aa9ae 100644 --- a/gramps/cli/grampscli.py +++ b/gramps/cli/grampscli.py @@ -367,5 +367,6 @@ def startcli(errors, argparser): # create a manager to manage the database handler.handle_args_cli() - + if handler.dbstate.db.is_open(): + handler.dbstate.db.close() sys.exit(0)