1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 13:19:13 +00:00

uv_python module: refactor code

This commit is contained in:
Mariam Ahhttouche 2026-02-16 16:16:29 +01:00
parent 571a5b5161
commit debdce35e7

View file

@ -123,9 +123,7 @@ class UV:
"""
rc, out, _ = self._find_python("--show-version")
latest_version = self._get_latest_patch_release()
if rc == 0:
detected_version = out.split()[0]
if detected_version == latest_version:
if rc == 0 and out.split()[0] == latest_version:
return False, latest_version
if self.module.check_mode:
return True, latest_version