Handle branches or refs in job specification.

Change-Id: If46832e6c1d5538fad88c9503c248372cb5b9416
Reviewed-on: https://review.openstack.org/14096
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2012-10-05 09:39:46 -07:00 committed by Jenkins
parent 172c076a1b
commit 45865f3e08
1 changed files with 3 additions and 1 deletions

View File

@ -339,7 +339,9 @@ class Job(object):
if not self.branches:
return True
for branch in self.branches:
if branch.match(change.branch):
if hasattr(change, 'branch') and branch.match(change.branch):
return True
if hasattr(change, 'ref') and branch.match(change.ref):
return True
return False