module_finder: pass raw file to compile()

Newer Ansibles have e.g. UTF-8 present in apt.py.
pull/607/head
David Wilson 5 years ago
parent 4eecc08047
commit 402dba4197

@ -57,7 +57,7 @@ def get_code(module):
"""
Compile and return a Module's code object.
"""
fp = open(module.path)
fp = open(module.path, 'rb')
try:
return compile(fp.read(), str(module.name), 'exec')
finally:

Loading…
Cancel
Save