diff --git a/master/buildbot/changes/svnpoller.py b/master/buildbot/changes/svnpoller.py index 9ed635eaedb..1022a8655d7 100644 --- a/master/buildbot/changes/svnpoller.py +++ b/master/buildbot/changes/svnpoller.py @@ -57,7 +57,7 @@ def split_file_branches(path): def split_file_projects_branches(path): # turn projectname/trunk/subdir/file.c into dict(project=projectname, branch=trunk, path=subdir/file.c) - if not "/" in path: + if "/" not in path: return None project, path = path.split("/", 1) f = split_file_branches(path) @@ -108,8 +108,8 @@ def __init__(self, svnurl, split_file=None, self.revlinktmpl = revlinktmpl - self.environ = os.environ.copy() # include environment variables - # required for ssh-agent auth + # include environment variables required for ssh-agent auth + self.environ = os.environ.copy() self.svnbin = svnbin self.histmax = histmax @@ -361,7 +361,7 @@ def create_changes(self, new_logentries): if where: branch = where.get("branch", None) filename = where["path"] - if not branch in branches: + if branch not in branches: branches[branch] = {'files': [], 'number_of_directories': 0} if filename == "": # root directory of branch diff --git a/master/buildbot/test/unit/test_changes_svnpoller.py b/master/buildbot/test/unit/test_changes_svnpoller.py index 92bcc555897..4d177920ca3 100644 --- a/master/buildbot/test/unit/test_changes_svnpoller.py +++ b/master/buildbot/test/unit/test_changes_svnpoller.py @@ -387,7 +387,7 @@ def makeInfoExpect(self, password='bbrocks'): if password is not None: args.append('--password=' + password) return gpo.Expect(*args) - + def makeLogExpect(self, password='bbrocks'): args = ['svn', 'log', '--xml', '--verbose', '--non-interactive', '--username=dustin']