From 7869891f8b4fb44113f179b372437636a0f9cb82 Mon Sep 17 00:00:00 2001 From: Chris Bailey Date: Thu, 21 Sep 2023 18:27:43 +0100 Subject: [PATCH] fix linting issues --- lib/ansible/modules/apt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/apt.py b/lib/ansible/modules/apt.py index 6f184fe297c..78537248e02 100644 --- a/lib/ansible/modules/apt.py +++ b/lib/ansible/modules/apt.py @@ -820,9 +820,9 @@ def install(m, pkgspec, cache, upgrade=False, default_release=None, changed = APT_GET_ZERO not in out data = dict(changed=changed, stdout=out, stderr=err, diff=diff) - + check_locked_error(out, err) - + if rc: status = False data = dict(msg="'%s' failed: %s" % (cmd, err), stdout=out, stderr=err, rc=rc) @@ -1545,5 +1545,6 @@ def check_locked_error(stdout, stderr): if ("lock was locked" in stderr or "lock was locked" in stdout): raise apt.cache.LockFailedException + if __name__ == "__main__": main()