gen_docu: output 'None' for an empty flags list
authorMatthias Braun <matthias.braun@kit.edu>
Fri, 15 Jun 2012 09:26:24 +0000 (11:26 +0200)
committerMatthias Braun <matthias.braun@kit.edu>
Fri, 15 Jun 2012 10:57:47 +0000 (12:57 +0200)
scripts/gen_docu.py

index 818e41c..e6f94c1 100755 (executable)
@@ -99,9 +99,13 @@ docu_template = env.from_string(
                                        </dl>
                                        {% set comma = joiner(", ") %}
                                        <h5>Flags</h5>
+                                       {% if node.flags.__len__() > 0 %}
                                        {% for flag in node.flags -%}
                                                {{comma()}}{{flag|doxylink("irop_flag_" + flag)}}
                                        {%- endfor %}
+                                       {% else %}
+                                       None
+                                       {% endif %}
                                        <h5>{{"API"|doxygrouplink(node.name)}}</h5>
                                        <hr/>
                                </div>