From 27e79a3e763b7a45e4530327167e58964d9ca3bf Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 5 Jan 2016 13:01:48 -0500 Subject: [PATCH] CLI: if database is opened at end, then close it --- gramps/cli/grampscli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)