1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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