From 2fdbf51ccc8c3bd3dfa0efe57a0f2cd247d567ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 27 Nov 2015 00:07:54 +0100 Subject: [PATCH] core: have QubesVmCollection.unlock_db no-op if not locked --- core/qubes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/qubes.py b/core/qubes.py index e910b66b..34d007f5 100755 --- a/core/qubes.py +++ b/core/qubes.py @@ -651,6 +651,8 @@ class QubesVmCollection(dict): self.qubes_store_file.close() def unlock_db(self): + if self.qubes_store_file is None: + return # intentionally do not call explicit unlock to not unlock the file # before all buffers are flushed self.log.debug('unlock_db()')