diff --git a/src/patchbot.py b/src/patchbot.py index 460d9c1..817f6a7 100755 --- a/src/patchbot.py +++ b/src/patchbot.py @@ -389,8 +389,15 @@ def test_a_ticket(self, ticket=None): print "No more tickets." time.sleep(self.config['idle']) return - rating, ticket = ticket + if len(ticket['depends_on']) > 0: + for dep_id in ticket['depends_on']: + time.sleep(1) + dep = self.lookup_ticket(dep_id) + if dep['status'] <> 'closed' and dep['status'] <> 'unknown': + print "Ticket has open dependency. Ignoring..." + return + print "\n" * 2 print "=" * 30, ticket['id'], "=" * 30 print ticket['title']