From b24ab45d0031ba348a981184724cfa460bfc58a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 20 May 2016 02:56:05 +0200 Subject: [PATCH] qubes/vm: fix network attach/detach --- qubes/vm/mix/net.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qubes/vm/mix/net.py b/qubes/vm/mix/net.py index 2f0cac2b..f26e79a1 100644 --- a/qubes/vm/mix/net.py +++ b/qubes/vm/mix/net.py @@ -202,8 +202,9 @@ class NetVMMixin(qubes.events.Emitter): self.log.info('Starting NetVM ({0})'.format(self.netvm.name)) self.netvm.start() - self.libvirt_domain.attachDevice(lxml.etree.ElementTree( - self.lvxml_net_dev(self.ip, self.mac, self.netvm)).tostring()) + self.libvirt_domain.attachDevice( + lxml.etree.tostring(lxml.etree.ElementTree( + self.lvxml_net_dev(self.ip, self.mac, self.netvm)))) def detach_network(self): @@ -213,8 +214,9 @@ class NetVMMixin(qubes.events.Emitter): raise qubes.exc.QubesVMNotRunningError(self) assert self.netvm is not None - self.libvirt_domain.detachDevice(lxml.etree.ElementTree( - self.lvxml_net_dev(self.ip, self.mac, self.netvm)).tostring()) + self.libvirt_domain.detachDevice( + lxml.etree.tostring(lxml.etree.ElementTree( + self.lvxml_net_dev(self.ip, self.mac, self.netvm)))) def is_networked(self):