mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix pylint compatibility in travis
See https://github.com/saltstack/salt/pull/6304#issuecomment-21590082
This commit is contained in:
parent
d1a769dae1
commit
8ef9155dcd
@ -304,7 +304,7 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
for p in yb.rpmdb:
|
||||
name = p.name
|
||||
if __grains__.get('cpuarch', '') == 'x86_64' \
|
||||
and re.match('i\d86', p.arch):
|
||||
and re.match(r'i\d86', p.arch):
|
||||
name += '.{0}'.format(p.arch)
|
||||
pkgver = p.version
|
||||
if p.release:
|
||||
@ -541,7 +541,7 @@ def install(name=None,
|
||||
if version is not None:
|
||||
if __grains__.get('cpuarch', '') == 'x86_64':
|
||||
try:
|
||||
arch = re.search('(\.i\d86)$', pkgname).group(1)
|
||||
arch = re.search(r'(\.i\d86)$', pkgname).group(1)
|
||||
except AttributeError:
|
||||
arch = ''
|
||||
else:
|
||||
@ -660,7 +660,7 @@ def remove(name=None, pkgs=None, **kwargs):
|
||||
for target in targets:
|
||||
if __grains__.get('cpuarch', '') == 'x86_64':
|
||||
try:
|
||||
arch = re.search('(\.i\d86)$', target).group(1)
|
||||
arch = re.search(r'(\.i\d86)$', target).group(1)
|
||||
except AttributeError:
|
||||
arch = None
|
||||
else:
|
||||
|
@ -75,7 +75,7 @@ def _parse_pkginfo(line):
|
||||
|
||||
# Support 32-bit packages on x86_64 systems
|
||||
if __grains__.get('cpuarch', '') == 'x86_64' \
|
||||
and re.match('i\d86', arch):
|
||||
and re.match(r'i\d86', arch):
|
||||
name += '.{0}'.format(arch)
|
||||
if rel:
|
||||
pkgver += '-{0}'.format(rel)
|
||||
@ -375,7 +375,7 @@ def install(name=None,
|
||||
cver = old.get(pkgname, '')
|
||||
if __grains__.get('cpuarch', '') == 'x86_64':
|
||||
try:
|
||||
arch = re.search('(\.i\d86)$', pkgname).group(1)
|
||||
arch = re.search(r'(\.i\d86)$', pkgname).group(1)
|
||||
except AttributeError:
|
||||
arch = ''
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user