mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
[PR #11379/b3dc06a7 backport][stable-12] Clean up other Python files (#11382)
Clean up other Python files (#11379)
* Address issues found by ruff check.
* Make mypy happy; remove some Python 2 compat code.
* Also declare port1.
(cherry picked from commit b3dc06a7dd)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -51,11 +51,10 @@ def main():
|
||||
with runner.context(p["arg_order"], check_mode_skip=p["check_mode_skip"]) as ctx:
|
||||
result = ctx.run(**p["arg_values"])
|
||||
info = ctx.run_info
|
||||
check = "check"
|
||||
rc, out, err = result if result is not None else (None, None, None)
|
||||
|
||||
module.exit_json(rc=rc, out=out, err=err, info=info)
|
||||
except Exception as exc:
|
||||
except Exception:
|
||||
module.fail_json(rc=1, module_stderr=traceback.format_exc(), msg="Module crashed with exception")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user