mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
yum: fix yum version comparison (#36573)
This commit is contained in:
parent
a7db945ac6
commit
a79a5439c8
1 changed files with 2 additions and 2 deletions
|
@ -347,7 +347,7 @@ def is_group_env_installed(name, conf_file, installroot='/'):
|
||||||
name_lower = name.lower()
|
name_lower = name.lower()
|
||||||
|
|
||||||
my = yum_base(conf_file, installroot)
|
my = yum_base(conf_file, installroot)
|
||||||
if yum.__version__ >= '3.4':
|
if yum.__version_info__ >= (3, 4):
|
||||||
groups_list = my.doGroupLists(return_evgrps=True)
|
groups_list = my.doGroupLists(return_evgrps=True)
|
||||||
else:
|
else:
|
||||||
groups_list = my.doGroupLists()
|
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()):
|
if name_lower.endswith(group.name.lower()) or name_lower.endswith(group.groupid.lower()):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if yum.__version__ >= '3.4':
|
if yum.__version_info__ >= (3, 4):
|
||||||
# list of the installed env_groups on the third index
|
# list of the installed env_groups on the third index
|
||||||
envs = groups_list[2]
|
envs = groups_list[2]
|
||||||
for env in envs:
|
for env in envs:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue