core: have QubesVmCollection.unlock_db no-op if not locked

This commit is contained in:
Marek Marczykowski-Górecki 2015-11-27 00:07:54 +01:00
parent cc3ab7aaa1
commit 2fdbf51ccc
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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()')