From 8ef9155dcda04ec06fef6ccaca4c37057d3840ad Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Thu, 25 Jul 2013 17:51:25 -0500 Subject: [PATCH] Fix pylint compatibility in travis See https://github.com/saltstack/salt/pull/6304#issuecomment-21590082 --- salt/modules/yumpkg.py | 6 +++--- salt/modules/yumpkg5.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index 15d2af2f8fe7..1432b5133904 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -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: diff --git a/salt/modules/yumpkg5.py b/salt/modules/yumpkg5.py index aad972648e93..e2c46b7d72f4 100644 --- a/salt/modules/yumpkg5.py +++ b/salt/modules/yumpkg5.py @@ -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: