diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-08-12 01:15:28 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-08-12 01:15:28 +0000 |
commit | 327419cda59f32c22116efbb7f6d1f5319d9a269 (patch) | |
tree | 60df083ec78b68a168a5ad2fcd67784283b1b3eb /gpscap.py | |
parent | 13588053c3894df940dd2f2f4fab5739fb5c61f1 (diff) | |
download | gpsd-327419cda59f32c22116efbb7f6d1f5319d9a269.tar.gz |
Make the submitter field a unform feature in gpscap records...
...rather than stashing it in the Notes field a lot of the time.
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") |