From 2996012f8916d90fb32af2fa3e2e2978e2f926f9 Mon Sep 17 00:00:00 2001 From: Alessandro Pilotti Date: Thu, 12 Sep 2013 20:49:55 +0300 Subject: [PATCH] Fixes Hyper-V agent unsopported network_type issue Fixes an issue when an exception is raised in case of not supported network types. Fixes bug: #1224583 Change-Id: I847aa825fbf5b7086c9960c051014cc1d7515f62 --- quantum/plugins/hyperv/agent/hyperv_quantum_agent.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py b/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py index 1ffdc912301..76ebc5c0e47 100644 --- a/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py +++ b/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py @@ -160,9 +160,10 @@ class HyperVQuantumAgent(object): #or create it if not existing pass else: - raise utils.HyperVException(_("Cannot provision unknown network " - "type %s for network %s"), - network_type, net_uuid) + raise utils.HyperVException( + msg=(_("Cannot provision unknown network type %(network_type)s" + " for network %(net_uuid)s") % + dict(network_type=network_type, net_uuid=net_uuid))) map = { 'network_type': network_type,