fix pylint 2.9 errors in awx collection

This commit is contained in:
Seth Foster
2021-06-30 14:28:35 -04:00
parent a58d571858
commit a9013c43fa
5 changed files with 25 additions and 24 deletions

View File

@@ -58,7 +58,8 @@ def main():
json_output = {'changed': False}
try:
manifest = base64.b64encode(open(module.params.get('manifest'), 'rb').read())
with open(module.params.get('manifest'), 'rb') as fid:
manifest = base64.b64encode(fid.read())
except OSError as e:
module.fail_json(msg=str(e))