module_finder: pass raw file to compile()

Newer Ansibles have e.g. UTF-8 present in apt.py.
This commit is contained in:
David Wilson 2019-07-23 16:04:44 +01:00
parent 4eecc08047
commit 402dba4197
1 changed files with 1 additions and 1 deletions

View File

@ -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: