Fix qubes.xml unlock code (#748)

Do not call explicit lockf(lOCK_UN) to not unlock the file
buffers are flushed. This is simpler than adding flush() call.
This commit is contained in:
Marek Marczykowski-Górecki 2013-10-02 04:52:18 +02:00
parent 76144df2e7
commit e6012a8fd2

View File

@ -492,7 +492,8 @@ class QubesVmCollection(dict):
fcntl.lockf (self.qubes_store_file, fcntl.LOCK_EX) fcntl.lockf (self.qubes_store_file, fcntl.LOCK_EX)
def unlock_db(self): def unlock_db(self):
fcntl.lockf (self.qubes_store_file, fcntl.LOCK_UN) # intentionally do not call explicit unlock to not unlock the file
# before all buffers are flushed
self.qubes_store_file.close() self.qubes_store_file.close()
def save(self): def save(self):