From 24aeaad857d81208229a011dcaf78bdf034252e8 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 1 Sep 2015 22:50:47 +0200 Subject: [PATCH] fix HostRSync filter matching (broken by the flake8 fixes) --- xdist/slavemanage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xdist/slavemanage.py b/xdist/slavemanage.py index 2084e59..076bc7f 100644 --- a/xdist/slavemanage.py +++ b/xdist/slavemanage.py @@ -154,13 +154,13 @@ class HostRSync(execnet.RSync): ignores = kwargs.pop('ignores', None) or [] for x in ignores: x = getattr(x, 'strpath', x) - self.ignores.append(re.compile(fnmatch.translate(x))) + self._ignores.append(re.compile(fnmatch.translate(x))) super(HostRSync, self).__init__(sourcedir=sourcedir, **kwargs) def filter(self, path): path = py.path.local(path) - for check in self._ignores: - if check(path.basename) or check(path.strpath): + for cre in self._ignores: + if cre.match(path.basename) or cre.match(path.strpath): return False else: return True