[PR #11215/862fe79a backport][stable-12] fix ruff case SIM110 (#11217)

fix ruff case SIM110 (#11215)

* fix ruff case SIM110

* Update plugins/module_utils/xenserver.py



* add changelog frag

---------


(cherry picked from commit 862fe79a22)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2025-11-25 21:59:06 +01:00
committed by GitHub
parent e741e22ec4
commit 8930d03c7c
16 changed files with 34 additions and 72 deletions

View File

@@ -159,11 +159,7 @@ def is_input_dangerous(string):
if not string:
return False
for pattern in (PATTERN_1, PATTERN_2, PATTERN_3):
if re.search(pattern, string):
return True
return False
return any(pattern.search(string) for pattern in (PATTERN_1, PATTERN_2, PATTERN_3))
def check_input(module, *args):