genhtml: Do not crash on nonexistend results
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 10 Dec 2010 07:42:32 +0000 (08:42 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 10 Dec 2010 07:42:32 +0000 (08:42 +0100)
gw-tests/genhtml/genhtml.py

index b8d231c..a6cab8f 100755 (executable)
@@ -176,8 +176,11 @@ class Test(object):
                 else:
                     vv = DimValues(self.values)
                     vv.replace(v)
-                    href = cdup + urllib.quote(self.tests[vv.key()].path+"/results.html")
-                    links.append("<a href='%s'>%s</a>"%(href, str(v)))
+                    try:
+                        href = cdup + urllib.quote(self.tests[vv.key()].path+"/results.html")
+                        links.append("<a href='%s'>%s</a>"%(href, str(v)))
+                    except KeyError:
+                        pass
             print >>html, "<tr><th>%s</th><td>" % d, " | ".join(links), "</td></tr>"
 
         print >>html, "</table></div>"