qubes/app: Fix create_empty_store signature

QubesOS/qubes-issues#1729
This commit is contained in:
Wojtek Porczyk 2016-11-30 18:34:11 +01:00
parent 68ad60c1b3
commit 5f436360f7

View File

@ -879,13 +879,14 @@ class Qubes(qubes.PropertyHolder):
qubes.vm.adminvm.AdminVM(self, None, qid=0, name='dom0'))
@classmethod
def create_empty_store(cls, lock=False, *args, **kwargs):
def create_empty_store(cls, *args, **kwargs):
self = cls(*args, load=False, **kwargs)
if os.path.exists(self.store):
raise qubes.exc.QubesException(
'{} already exists, aborting'.format(self.store))
self.load_initial_values()
self.save(lock=lock)
# TODO py3 get lock= as keyword-only arg
self.save(kwargs.get('lock'))
return self