summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2016-10-19 13:07:04 +0200
committerBrian Coca <bcoca@users.noreply.github.com>2016-10-19 10:15:22 -0400
commit953cd915bb567564d951de79167229eec7bc5aa7 (patch)
tree573f7cd61961ed58e75193ac6aba73dcbd09900b
parent20726b94be64b17829f5afb712b4b5f542515229 (diff)
downloadansible-modules-core-953cd915bb567564d951de79167229eec7bc5aa7.tar.gz
Cleanup imports of xattr
Since the module use re and os, we need to import them. And rather than importing '*', we should limit to the only object/function needed, so we can more easily refactor later.
-rw-r--r--files/xattr.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/files/xattr.py b/files/xattr.py
index 37866547..8f12c853 100644
--- a/files/xattr.py
+++ b/files/xattr.py
@@ -73,6 +73,8 @@ EXAMPLES = '''
'''
import operator
+import re
+import os
def get_xattr_keys(module,path,follow):
cmd = [ module.get_bin_path('getfattr', True) ]
@@ -202,7 +204,7 @@ def main():
module.exit_json(changed=changed, msg=msg, xattr=res)
# import module snippets
-from ansible.module_utils.basic import *
-
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.pycompat24 import get_exception
if __name__ == '__main__':
main()