From 1e53aaa3a1e6292b18b0080f75de169ca6ca8be5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 29 Sep 2011 14:18:58 -0400 Subject: Display vendor notes in the HTML of the hardware table. --- gpscap.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gpscap.py') diff --git a/gpscap.py b/gpscap.py index f8562fad..2aed91b1 100644 --- a/gpscap.py +++ b/gpscap.py @@ -68,11 +68,15 @@ class GPSDictionary(ConfigParser.RawConfigParser): Notes """ - vhead = "%s\n" + vhead1 = "%s\n" + vhead2 = "%s

%s

\n" hotpluggables = ("pl2303", "CP2101") ofp.write(thead % (len(self.devices), len(self.vendors))) for vendor in self.vendors: - ofp.write(vhead % (self.get(vendor, "vendor_site"), vendor)) + if self.has_option(vendor, "notes"): + ofp.write(vhead2 % (self.get(vendor, "vendor_site"), vendor, self.get(vendor, "notes"))) + else: + ofp.write(vhead1 % (self.get(vendor, "vendor_site"), vendor)) relevant = [] for dev in self.devices: if self.get(dev, "vendor") == vendor: -- cgit v1.2.1