core2migration: adjust for recent storage API changes

QubesVM.storage.vmdir uses QubesVM.dir_path, so can't be used directly
as default value for dir_path. Use `super()`.
This commit is contained in:
Marek Marczykowski-Górecki 2016-08-15 23:47:28 +02:00
parent 660c726315
commit eb637147fb
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -36,7 +36,7 @@ import qubes.ext.r3compatibility
class AppVM(qubes.vm.appvm.AppVM): class AppVM(qubes.vm.appvm.AppVM):
"""core2 compatibility AppVM class, with variable dir_path""" """core2 compatibility AppVM class, with variable dir_path"""
dir_path = qubes.property('dir_path', dir_path = qubes.property('dir_path',
default=(lambda self: self.storage.vmdir), default=(lambda self: super(AppVM, self).dir_path),
saver=qubes.property.dontsave, saver=qubes.property.dontsave,
doc="VM storage directory", doc="VM storage directory",
) )
@ -47,7 +47,7 @@ class AppVM(qubes.vm.appvm.AppVM):
class StandaloneVM(qubes.vm.standalonevm.StandaloneVM): class StandaloneVM(qubes.vm.standalonevm.StandaloneVM):
"""core2 compatibility StandaloneVM class, with variable dir_path""" """core2 compatibility StandaloneVM class, with variable dir_path"""
dir_path = qubes.property('dir_path', dir_path = qubes.property('dir_path',
default=(lambda self: self.storage.vmdir), default=(lambda self: super(StandaloneVM, self).dir_path),
saver=qubes.property.dontsave, saver=qubes.property.dontsave,
doc="VM storage directory") doc="VM storage directory")