mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
yum: fix yum version comparison (#36573)
This commit is contained in:
@@ -347,7 +347,7 @@ def is_group_env_installed(name, conf_file, installroot='/'):
|
||||
name_lower = name.lower()
|
||||
|
||||
my = yum_base(conf_file, installroot)
|
||||
if yum.__version__ >= '3.4':
|
||||
if yum.__version_info__ >= (3, 4):
|
||||
groups_list = my.doGroupLists(return_evgrps=True)
|
||||
else:
|
||||
groups_list = my.doGroupLists()
|
||||
@@ -358,7 +358,7 @@ def is_group_env_installed(name, conf_file, installroot='/'):
|
||||
if name_lower.endswith(group.name.lower()) or name_lower.endswith(group.groupid.lower()):
|
||||
return True
|
||||
|
||||
if yum.__version__ >= '3.4':
|
||||
if yum.__version_info__ >= (3, 4):
|
||||
# list of the installed env_groups on the third index
|
||||
envs = groups_list[2]
|
||||
for env in envs:
|
||||
|
||||
Reference in New Issue
Block a user