diff piecrust/processing/tree.py @ 191:308d5180bf81

processing: Add more information to the pipeline record. We now save whether an asset was processed by an external tool that bypasses the pipeline, and the tree of processor names involved.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 11 Jan 2015 23:01:21 -0800
parents 3834e2ef0cf2
children a47580a0955b
line wrap: on
line diff
--- a/piecrust/processing/tree.py	Sun Jan 11 22:58:38 2015 -0800
+++ b/piecrust/processing/tree.py	Sun Jan 11 23:01:21 2015 -0800
@@ -274,3 +274,17 @@
         for o in node.outputs:
             print_node(o, None, True)
 
+
+def get_node_name_tree(node):
+    try:
+        proc_name = node.getProcessor().PROCESSOR_NAME
+    except ProcessorNotFoundError:
+        proc_name = 'n/a'
+
+    children = []
+    for o in node.outputs:
+        if not o.outputs:
+            continue
+        children.append(get_node_name_tree(o))
+    return (proc_name, children)
+