run_hook: no more than one plugin shall return a result
authorThomasV <thomasv@gitorious>
Thu, 10 Jul 2014 15:27:54 +0000 (17:27 +0200)
committerThomasV <thomasv@gitorious>
Thu, 10 Jul 2014 15:27:54 +0000 (17:27 +0200)
lib/plugins.py

index ff4a246..feea2fc 100644 (file)
@@ -51,9 +51,12 @@ def run_hook(name, *args):
             print_error("Plugin error")
             traceback.print_exc(file=sys.stdout)
 
-        results.append((p.name,r))
+        if r:
+            results.append(r)
 
-    return results
+    if results:
+        assert len(results) == 1, results
+        return results[0]