Merge "Bug 1015953 - linuxbridge_quantum_agent device_exists() is buggy"

This commit is contained in:
Jenkins
2012-06-21 13:32:40 +00:00
committed by Gerrit Code Review

View File

@@ -66,12 +66,12 @@ class LinuxBridge:
def device_exists(self, device): def device_exists(self, device):
"""Check if ethernet device exists.""" """Check if ethernet device exists."""
retval = utils.execute(['ip', 'link', 'show', try:
'dev', device], root_helper=self.root_helper) utils.execute(['ip', 'link', 'show', 'dev', device],
if retval: root_helper=self.root_helper)
return True except RuntimeError:
else:
return False return False
return True
def get_bridge_name(self, network_id): def get_bridge_name(self, network_id):
if not network_id: if not network_id: