diff options
Diffstat (limited to 'gpscap.py')
-rw-r--r-- | gpscap.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -128,7 +128,14 @@ class GPSDictionary(ConfigParser.RawConfigParser): if self.has_option(dev, "nmea"): nmea = self.get(dev, "nmea") ofp.write("<td>%s</td>\n" % nmea) - ofp.write("<td>%s</td>\n" % self.get(dev, "notes")) + if self.has_option(dev, "notes"): + notes = self.get(dev, "notes") + else: + notes = "" + if self.has_option(dev, "submitter"): + notes += " Reported by %s." % self.get(dev, "submitter") + notes = notes.replace("@", "@").replace("<", "<").replace(">", ">") + ofp.write("<td>%s</td>\n" % notes) ofp.write("</tr>\n") ofp.write("</table>\n") |