mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
modules.yumpkg5._parse_pkginfo(): avoid shadowing
************* Module salt.modules.yumpkg5 salt/modules/yumpkg5.py:74: [W0621(redefined-outer-name), _parse_pkginfo] Redefining name 'version' from outer scope (line 227)
This commit is contained in:
parent
baa3a4b8cf
commit
11d55bcfaf
@ -71,7 +71,7 @@ def _parse_pkginfo(line):
|
||||
)
|
||||
|
||||
try:
|
||||
name, version, release, arch, repoid = line.split('_|-')
|
||||
name, pkg_version, release, arch, repoid = line.split('_|-')
|
||||
# Handle unpack errors (should never happen with the queryformat we are
|
||||
# using, but can't hurt to be careful).
|
||||
except ValueError:
|
||||
@ -80,9 +80,9 @@ def _parse_pkginfo(line):
|
||||
if arch != 'noarch' and arch != __grains__['osarch']:
|
||||
name += '.{0}'.format(arch)
|
||||
if release:
|
||||
version += '-{0}'.format(release)
|
||||
pkg_version += '-{0}'.format(release)
|
||||
|
||||
return pkginfo(name, version, arch, repoid)
|
||||
return pkginfo(name, pkg_version, arch, repoid)
|
||||
|
||||
|
||||
def _repoquery(repoquery_args):
|
||||
|
Loading…
Reference in New Issue
Block a user