1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-08 21:17:20 +00:00

[PR #11189/1c678f5c backport][stable-12] fix ruff case UP030 (#11195)

fix ruff case UP030 (#11189)

* fix ruff case UP030

* add changelog frag

* formatting

* suggestion from review

(cherry picked from commit 1c678f5c07)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-11-23 08:58:57 +01:00 committed by GitHub
parent 084ecd96e1
commit f648dca84a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 10 deletions

View file

@ -338,11 +338,8 @@ class Snap(StateModuleHelper):
process_ = process_many
if "warning: no snap found" in check_error:
self.do_raise(
"Snaps not found: {0}.".format(
[x.split()[-1] for x in out.split("\n") if x.startswith("warning: no snap found")]
)
)
snaps_not_found = [x.split()[-1] for x in out.split("\n") if x.startswith("warning: no snap found")]
self.do_raise(f"Snaps not found: {snaps_not_found}.")
return process_(rc, out, err)
names = []