Merge "Bug 1015953 - linuxbridge_quantum_agent device_exists() is buggy"
This commit is contained in:
@@ -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:
|
||||||
|
Reference in New Issue
Block a user