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
父節點 660c726315
當前提交 eb637147fb
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 063938BA42CFA724

查看文件

@ -36,7 +36,7 @@ import qubes.ext.r3compatibility
class AppVM(qubes.vm.appvm.AppVM):
"""core2 compatibility AppVM class, with variable 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,
doc="VM storage directory",
)
@ -47,7 +47,7 @@ class AppVM(qubes.vm.appvm.AppVM):
class StandaloneVM(qubes.vm.standalonevm.StandaloneVM):
"""core2 compatibility StandaloneVM class, with variable 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,
doc="VM storage directory")