From 3068b6ef5f4f327e0db358d8213d7d7ff1174ab4 Mon Sep 17 00:00:00 2001 From: Antoine Millet Date: Mon, 7 Mar 2016 17:42:25 +0100 Subject: [PATCH] Use -- in order to prevent argparse to handle removed VLAN as arguments --- cloudcontrol/node/hypervisor/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudcontrol/node/hypervisor/__init__.py b/cloudcontrol/node/hypervisor/__init__.py index e089185..5aa9a6f 100644 --- a/cloudcontrol/node/hypervisor/__init__.py +++ b/cloudcontrol/node/hypervisor/__init__.py @@ -262,11 +262,11 @@ class Handler(HostHandler): if name in self.hypervisor.domains: if mac_address is None: rcode, output = execute(self.main, [self.main.config.vlan_script, - name, vlan_update_format]) + name, '--', vlan_update_format]) else: rcode, output = execute(self.main, [self.main.config.vlan_script, '--iface-macaddr', mac_address, - name, vlan_update_format]) + name, '--', vlan_update_format]) if rcode != 0: raise RuntimeError(output.strip().split('\n')[-1].strip()) else: -- GitLab