Make nmcli pass py3 sanity check

Cleanup include, do not use '*' for future refactoring.

Since nmcli is not present on EL5, we can safely use python
2.6 syntax only.
This commit is contained in:
Michael Scherer 2016-10-19 18:45:33 +02:00 committed by Matt Clay
parent 32c4190ac8
commit 04996c3720
3 changed files with 5 additions and 5 deletions

View file

@ -395,6 +395,9 @@ try:
except ImportError:
pass
from ansible.module_utils.basic import AnsibleModule
class Nmcli(object):
"""
This is the generic nmcli manipulation class that is subclassed based on platform.
@ -490,7 +493,7 @@ class Nmcli(object):
for setting in secrets:
for key in secrets[setting]:
config[setting_name][key]=secrets[setting][key]
except Exception, e:
except Exception as e:
pass
def dict_to_string(self, d):
@ -1080,7 +1083,4 @@ def main():
module.exit_json(**result)
# import module snippets
from ansible.module_utils.basic import *
main()

View file

@ -13,3 +13,4 @@
/univention/
/web_infrastructure/letsencrypt.py
/infrastructure/foreman/
/network/nmcli.py

View file

@ -50,4 +50,3 @@
/network/cloudflare_dns.py
/network/f5/bigip_gtm_virtual_server.py
/network/f5/bigip_gtm_wide_ip.py
/network/nmcli.py