mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make openvswitch* pass py3 sanity check
This commit is contained in:
parent
2a83eefaae
commit
7f4fdba0c6
3 changed files with 10 additions and 6 deletions
|
@ -143,7 +143,8 @@ class OVSBridge(object):
|
|||
changed = True
|
||||
elif self.state == 'present' and not self.exists():
|
||||
changed = True
|
||||
except Exception, earg:
|
||||
except Exception:
|
||||
earg = get_exception()
|
||||
self.module.fail_json(msg=str(earg))
|
||||
|
||||
# pylint: enable=W0703
|
||||
|
@ -189,7 +190,8 @@ class OVSBridge(object):
|
|||
self.set_external_id(key, None)):
|
||||
changed = True
|
||||
|
||||
except Exception, earg:
|
||||
except Exception:
|
||||
earg = get_exception()
|
||||
self.module.fail_json(msg=str(earg))
|
||||
# pylint: enable=W0703
|
||||
self.module.exit_json(changed=changed)
|
||||
|
@ -267,4 +269,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
main()
|
||||
|
|
|
@ -204,7 +204,8 @@ class OVSPort(object):
|
|||
changed = True
|
||||
else:
|
||||
changed = False
|
||||
except Exception, earg:
|
||||
except Exception:
|
||||
earg = get_exception()
|
||||
self.module.fail_json(msg=str(earg))
|
||||
self.module.exit_json(changed=changed)
|
||||
|
||||
|
@ -235,7 +236,8 @@ class OVSPort(object):
|
|||
external_id = fmt_opt % (self.port, key, value)
|
||||
changed = self.set(external_id) or changed
|
||||
##
|
||||
except Exception, earg:
|
||||
except Exception:
|
||||
earg = get_exception()
|
||||
self.module.fail_json(msg=str(earg))
|
||||
self.module.exit_json(changed=changed)
|
||||
|
||||
|
@ -269,4 +271,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
main()
|
||||
|
|
|
@ -51,5 +51,3 @@
|
|||
/network/f5/bigip_gtm_virtual_server.py
|
||||
/network/f5/bigip_gtm_wide_ip.py
|
||||
/network/nmcli.py
|
||||
/network/openvswitch_bridge.py
|
||||
/network/openvswitch_port.py
|
||||
|
|
Loading…
Reference in a new issue