CSIT-560: csit src code doc generation for 1704 32/6232/2
authorTibor Frank <tifrank@cisco.com>
Tue, 18 Apr 2017 12:54:10 +0000 (14:54 +0200)
committerPeter Mikus <pmikus@cisco.com>
Wed, 19 Apr 2017 05:47:39 +0000 (05:47 +0000)
Change-Id: I9f07f326e12942404d670004bb9463039967f954
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/libraries/python/VatHistory.py

index caa3de5..e46a737 100644 (file)
@@ -22,10 +22,14 @@ __all__ = ["DICT__duts_vat_history", "VatHistory"]
 
 def setup_vat_history(nodes):
     duts_vat_history = {}
-    for node in nodes.values():
-        if node['type'] == NodeType.DUT:
-            duts_vat_history[node['host']] = []
-    return duts_vat_history
+    try:
+        for node in nodes.values():
+            if node['type'] == NodeType.DUT:
+                duts_vat_history[node['host']] = []
+        return duts_vat_history
+    except AttributeError:
+        # Necessary for the generation of source code documentation.
+        pass
 
 DICT__duts_vat_history = setup_vat_history(DICT__nodes)
 

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.