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()
|
||||
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue