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
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()