diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index d2cf6a3efa..36d6a33361 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -444,7 +444,7 @@ class XendDomainInfo: if self.memory is None: raise VmError('missing memory size') cpu = sxp.child_value(config, 'cpu') - if self.dom and cpu is not None: + if self.recreate and self.dom and cpu is not None: xc.domain_pincpu(self.dom, int(cpu)) self.init_domain() diff --git a/tools/python/xen/xend/server/controller.py b/tools/python/xen/xend/server/controller.py index 3ba9d46f48..5b2d7e25a0 100755 --- a/tools/python/xen/xend/server/controller.py +++ b/tools/python/xen/xend/server/controller.py @@ -68,7 +68,7 @@ class CtrlMsgRcvr: @type responders: {int:Responder} """ - def __init__(self, remote_port = 0): + def __init__(self, remote_port=0): self.channelFactory = channel.channelFactory() self.majorTypes = {} self.dom = None