Ensure we have enough values to split (#56802)
Avoid raising an exception if pkgstr does not complains with expected value.
This commit is contained in:
parent
550e021cd2
commit
433c98eae0
1 changed files with 1 additions and 1 deletions
|
@ -807,7 +807,7 @@ class YumModule(YumDnf):
|
|||
os.environ["https_proxy"] = old_proxy_env[1]
|
||||
|
||||
def pkg_to_dict(self, pkgstr):
|
||||
if pkgstr.strip():
|
||||
if pkgstr.strip() and pkgstr.count('|') == 5:
|
||||
n, e, v, r, a, repo = pkgstr.split('|')
|
||||
else:
|
||||
return {'error_parsing': pkgstr}
|
||||
|
|
Loading…
Reference in a new issue