casts the bridge id to a str prior to building command (#21805)

This will prevent exception from being raise when calling _vsctl and
extending the cmd with the bridge information
This commit is contained in:
Peter Sprygada
2017-02-22 19:31:36 -05:00
committed by GitHub
parent 08a752faea
commit 1ef0287854

View File

@@ -193,7 +193,7 @@ class OVSBridge(object):
'''Create the bridge'''
cmd = ['add-br', self.bridge]
if self.parent and self.vlan: # Add fake bridge
cmd += [self.parent, self.vlan]
cmd += [self.parent, str(self.vlan)]
if self.set and self.set_opt:
cmd += ["--", "set"]
@@ -296,6 +296,7 @@ class OVSBridge(object):
changed = True
except Exception:
raise
earg = get_exception()
self.module.fail_json(msg=str(earg))
# pylint: enable=W0703