[gnome-lirc-properties] Fixed lirc-receiver-list script to produce valid output
- From: Johannes Schmid <jhs src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-lirc-properties] Fixed lirc-receiver-list script to produce valid output
- Date: Thu, 17 Sep 2009 09:46:16 +0000 (UTC)
commit 91612593e6b75f2d9a73b84a183932212c137ebd
Author: Johannes Schmid <jhs gnome org>
Date: Wed Sep 16 12:03:33 2009 +0200
Fixed lirc-receiver-list script to produce valid output
bin/lirc-receiver-list | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/bin/lirc-receiver-list b/bin/lirc-receiver-list
index 90b39d4..8101ecd 100755
--- a/bin/lirc-receiver-list
+++ b/bin/lirc-receiver-list
@@ -238,6 +238,11 @@ def scan_kernel_driver(filename):
# print findings:
section = '%s: %s' % (vendor_name, product_name)
+
+ # ensure section name is valid (could be more clever...)
+ section = section.replace("[", "(")
+ section = section.replace("]", ")")
+
receiver_sections.append(section)
print '# from %s, line %d' % (srcname, line + 1)
@@ -340,7 +345,7 @@ if '__main__' == __name__:
re_company_suffix = re.compile(re_company_suffix)
# read device id databases:
- usb_ids = DeviceDatabase(gzip.open('/usr/share/misc/usb.ids'))
+ usb_ids = DeviceDatabase(open('/usr/share/misc/usb.ids'))
pci_ids = DeviceDatabase(open('/usr/share/misc/pci.ids'))
# read overrides databases:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]