Fix error when NO_PDF environment variable is not defined
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 17 Dec 2010 21:03:58 +0000 (22:03 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 17 Dec 2010 21:03:58 +0000 (22:03 +0100)
gw-tests/genhtml/genhtml.py

index 1990302..fd5940c 100755 (executable)
@@ -154,7 +154,7 @@ 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):
-        if os.environ['NO_PDF']:
+        if 'NO_PDF' in os.environ:
             return "<div><img src='%s' /></div>" % pngName
         else:
             return "<div><a href='%s'><img src='%s' /></a></div>" % \