core: fix saving 'dispvm_netvm' attribute

This commit is contained in:
Marek Marczykowski-Górecki 2015-04-06 00:21:08 +02:00
parent 221750af94
commit 678ccdfaa0

View File

@ -192,7 +192,7 @@ class QubesVm(object):
'uses_default_kernel', 'kernel', 'uses_default_kernelopts',\ 'uses_default_kernel', 'kernel', 'uses_default_kernelopts',\
'kernelopts', 'services', 'installed_by_rpm',\ 'kernelopts', 'services', 'installed_by_rpm',\
'uses_default_netvm', 'include_in_backups', 'debug',\ 'uses_default_netvm', 'include_in_backups', 'debug',\
'qrexec_timeout', 'autostart', 'qrexec_timeout', 'autostart', 'uses_default_dispvm_netvm',
'backup_content', 'backup_size', 'backup_path' ]: 'backup_content', 'backup_size', 'backup_path' ]:
attrs[prop]['save'] = lambda prop=prop: str(getattr(self, prop)) attrs[prop]['save'] = lambda prop=prop: str(getattr(self, prop))
# Simple paths # Simple paths
@ -224,7 +224,6 @@ class QubesVm(object):
lambda: str(self.dispvm_netvm.qid) \ lambda: str(self.dispvm_netvm.qid) \
if self.dispvm_netvm is not None \ if self.dispvm_netvm is not None \
else "none" else "none"
attrs['dispvm_netvm']['save_attr'] = "dispvm_netvm_qid"
attrs['template']['save'] = \ attrs['template']['save'] = \
lambda: str(self.template.qid) if self.template else "none" lambda: str(self.template.qid) if self.template else "none"
attrs['template']['save_attr'] = "template_qid" attrs['template']['save_attr'] = "template_qid"