[hooks] don't crash in start_period_tests if we can't find a branch head
authorJulien Cristau <julien.cristau@logilab.fr>
Fri, 24 Jan 2014 11:39:31 +0100
changeset 1471 92c45a03e06d
parent 1470 774bd1d5f4bc
child 1472 bc28ed883351
[hooks] don't crash in start_period_tests if we can't find a branch head If branch_head(branch) returns None, just ignore it instead of crashing.
hooks.py
--- a/hooks.py	Tue Apr 22 12:14:58 2014 +0200
+++ b/hooks.py	Fri Jan 24 11:39:31 2014 +0100
@@ -48,6 +48,8 @@
                     continue
                 heads = (head,)
             for head in heads:
+                if head is None:
+                    continue
                 # only start test if the config hasn't been executed against
                 # current branch head
                 if session.execute(