diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-05-30 01:03:35 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-05-30 04:14:32 -0400 |
commit | 909d0d540dce85623e0bbc03f042e39a99b69af6 (patch) | |
tree | 29a77d9c832cbbdf00f7bbef0791d988c15728ef /www | |
parent | 0f9e24ab36e310164f62ca7b9322bf7699660b2c (diff) | |
download | gpsd-909d0d540dce85623e0bbc03f042e39a99b69af6.tar.gz |
More logfile decoration in the CGI.
Diffstat (limited to 'www')
-rw-r--r-- | www/gps_report.cgi.in | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/www/gps_report.cgi.in b/www/gps_report.cgi.in index 4b5f5275..93c1fc36 100644 --- a/www/gps_report.cgi.in +++ b/www/gps_report.cgi.in @@ -80,12 +80,15 @@ if hasRequiredElements(form) and form.getvalue("action") == "Send Report": report.attach(MIMEText(msg)) # Decorate the log data with some canned headers - # Omitted: nmea, notes, sample_notes, submitter, techdoc, tested, usbchip + # Omitted: nmea, notes, techdoc, tested, usbchip header = '' - header += "# Name: %s %s\n" % (form.getvalue('vendor'), form.getvalue('model')) - for fld in ("chipset", "firmware", 'date', 'location'): - if form.has_key(fld) and form.getvalue(fld): + header += "# Name: %s %s\n" \ + % (form.getvalue('vendor'), form.getvalue('model')) + for fld in ("chipset", "firmware", 'date', 'submitter', 'location'): + if form.has_key(fld): header += "# %s: %s\n" % (fld.capitalize(), form.getvalue(fld)) + if form.has_key('sample_notes') and form.getvalue('sample_notes'): + header += "# Notes: %s\n" % form.getvalue('sample_notes') content = MIMEText(header + output_sample_content) encode_base64(content) report.attach(content) |