Francesco Romani has uploaded a new change for review. Change subject: virt: graphics: avoid None in specParams ......................................................................
virt: graphics: avoid None in specParams In commit bbe8a03 we added a check to make sure we use displayNetwork from global Vm configuration, in the case the more specific setting was not sent in the graphics device specParams. One unfortunate side effect of this change is that now None may end up in the graphics device specParams, breaking XML-RPC communications. We default (end recommend) JSON-RPC, but we still support XML-RPC, and we use it as default in vdsClient, so this must be avoided. This patch reorganize the check to avoid the unwanted injection of the None value. Change-Id: I2a651c18c02c207f5497f22f0aad3d2967efd9a4 Related-To: https://bugzilla.redhat.com/1261007 Signed-off-by: Francesco Romani <[email protected]> --- M vdsm/virt/vmdevices/graphics.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/46629/1 diff --git a/vdsm/virt/vmdevices/graphics.py b/vdsm/virt/vmdevices/graphics.py index c6ed06d..6edffd6 100644 --- a/vdsm/virt/vmdevices/graphics.py +++ b/vdsm/virt/vmdevices/graphics.py @@ -59,9 +59,9 @@ # It's possible that the network is specified vm's conf # and not in specParams. This is considered legacy. - self.specParams['displayNetwork'] = ( - self.specParams.get('displayNetwork') or conf.get('displayNetwork') - ) + confDisplayNetwork = conf.get('displayNetwork') + if not self.specParams.get('displayNetwork') and confDisplayNetwork: + self.specParams['displayNetwork'] = confDisplayNetwork self.specParams['displayIp'] = ( _getNetworkIp(self.specParams.get('displayNetwork'))) -- To view, visit https://gerrit.ovirt.org/46629 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a651c18c02c207f5497f22f0aad3d2967efd9a4 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
