Do net generate links to .pdf for web
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 23:43:34 +0000 (00:43 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 23:43:34 +0000 (00:43 +0100)
gw-tests/genhtml/genhtml.py

index db2d5e5..1990302 100755 (executable)
@@ -154,8 +154,11 @@ class Test(object):
             print >>file, "<a href='%s/results.html'><img src='%s/%s'></a>" % \
                   (urllib.quote(self.path), urllib.quote(self.path), img)
     def fullImgLink(self, pngName):
-        return "<div><a href='%s'><img src='%s' /></a></div>" % \
-               (pngName[:-4]+".pdf", pngName)
+        if os.environ['NO_PDF']:
+            return "<div><img src='%s' /></div>" % pngName
+        else:
+            return "<div><a href='%s'><img src='%s' /></a></div>" % \
+                   (pngName[:-4]+".pdf", pngName)
         
     def htmlPrintStats(self, html):
         cwd = os.getcwd()