[glib] gtester-report: Ignore package, version and revision info if missing



commit bf7fcd2559fdb7c332fe4e2dac8aecd09f1a8e9c
Author: Jason Conti <jason conti gmail com>
Date:   Tue Aug 14 14:29:40 2012 -0400

    gtester-report: Ignore package, version and revision info if missing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668035

 glib/gtester-report |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/glib/gtester-report b/glib/gtester-report
index 4f20143..d11b255 100755
--- a/glib/gtester-report
+++ b/glib/gtester-report
@@ -239,9 +239,10 @@ class HTMLReportWriter(ReportWriter):
     if message:
       self.lastchar = message[-1]
   def handle_info (self):
-    self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
-    if self.info['revision']:
-        self.oprint ('<h5>Report generated from: %(revision)s</h5>\n' % self.info)
+    if 'package' in self.info and 'version' in self.info:
+      self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
+      if 'revision' in self.info:
+          self.oprint ('<h5>Report generated from: %(revision)s</h5>\n' % self.info)
   def handle_text (self, node):
     self.oprint (node.nodeValue)
   def handle_testcase (self, node, binary):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]