Skip to content

Commit

Permalink
fix filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Mar 11, 2010
1 parent d0c0fe0 commit 8dd807c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions buildbot/schedulers/base.py
Expand Up @@ -115,8 +115,13 @@ class ClassifierMixin:
"""

def make_filter(self, change_filter=None, branch=NotABranch, categories=None):
if change_filter and (branch is not NotABranch or categories is not None):
raise RuntimeError("cannot specify both change_filter and either branch or categories")
if change_filter:
if (branch is not NotABranch or categories is not None):
raise RuntimeError("cannot specify both change_filter and either branch or categories")
self.change_filter = change_filter
return

# build a change filter from the deprecated category and branch args
cfargs = {}
if branch is not NotABranch: cfargs['branch'] = branch
if categories: cfargs['category'] = categories
Expand Down

0 comments on commit 8dd807c

Please sign in to comment.