Merge pull request #6320 from terminalmage/quickfix

Fix pylint compatibility in travis
This commit is contained in:
Joseph Hall 2013-07-25 16:17:46 -07:00
commit bb3209ce81
2 changed files with 5 additions and 5 deletions

View File

@ -304,7 +304,7 @@ def list_pkgs(versions_as_list=False, **kwargs):
for p in yb.rpmdb: for p in yb.rpmdb:
name = p.name name = p.name
if __grains__.get('cpuarch', '') == 'x86_64' \ 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) name += '.{0}'.format(p.arch)
pkgver = p.version pkgver = p.version
if p.release: if p.release:
@ -541,7 +541,7 @@ def install(name=None,
if version is not None: if version is not None:
if __grains__.get('cpuarch', '') == 'x86_64': if __grains__.get('cpuarch', '') == 'x86_64':
try: try:
arch = re.search('(\.i\d86)$', pkgname).group(1) arch = re.search(r'(\.i\d86)$', pkgname).group(1)
except AttributeError: except AttributeError:
arch = '' arch = ''
else: else:
@ -660,7 +660,7 @@ def remove(name=None, pkgs=None, **kwargs):
for target in targets: for target in targets:
if __grains__.get('cpuarch', '') == 'x86_64': if __grains__.get('cpuarch', '') == 'x86_64':
try: try:
arch = re.search('(\.i\d86)$', target).group(1) arch = re.search(r'(\.i\d86)$', target).group(1)
except AttributeError: except AttributeError:
arch = None arch = None
else: else:

View File

@ -75,7 +75,7 @@ def _parse_pkginfo(line):
# Support 32-bit packages on x86_64 systems # Support 32-bit packages on x86_64 systems
if __grains__.get('cpuarch', '') == 'x86_64' \ if __grains__.get('cpuarch', '') == 'x86_64' \
and re.match('i\d86', arch): and re.match(r'i\d86', arch):
name += '.{0}'.format(arch) name += '.{0}'.format(arch)
if rel: if rel:
pkgver += '-{0}'.format(rel) pkgver += '-{0}'.format(rel)
@ -375,7 +375,7 @@ def install(name=None,
cver = old.get(pkgname, '') cver = old.get(pkgname, '')
if __grains__.get('cpuarch', '') == 'x86_64': if __grains__.get('cpuarch', '') == 'x86_64':
try: try:
arch = re.search('(\.i\d86)$', pkgname).group(1) arch = re.search(r'(\.i\d86)$', pkgname).group(1)
except AttributeError: except AttributeError:
arch = '' arch = ''
else: else: