aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-usb.py
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2012-12-05 12:56:41 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2012-12-05 12:56:41 +0000
commit57f7171c870c58802873d241849d1f8f7b7c93e2 (patch)
tree86fb79445c9dd246585fadcc0c355819e43c8877 /tools/make-usb.py
parentda700a93b6e049afe5b34bd6c1a64fdbc215c70c (diff)
Update USB vendor and product ids and escape non ASCII characters
svn path=/trunk/; revision=46398
Diffstat (limited to 'tools/make-usb.py')
-rw-r--r--tools/make-usb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/make-usb.py b/tools/make-usb.py
index e69f3acd0d..6ed958c31c 100644
--- a/tools/make-usb.py
+++ b/tools/make-usb.py
@@ -36,11 +36,11 @@ for line in lines:
if mode == MODE_VENDOR_PRODUCT:
if re.match("^[0-9a-f]{4}", line):
- vendors += " { 0x%s, \"%s\" },\n"%(line[:4], re.sub("\"", "\\\"", re.sub("\?+", "?", line[4:].strip().replace("\\", "\\\\"))))
+ vendors += " { 0x%s, \"%s\" },\n"%(line[:4], re.sub("\"", "\\\"", re.sub("\?+", "?", repr(line[4:].strip())[1:-1].replace("\\", "\\\\"))))
last_vendor = line[:4]
elif re.match("^\t[0-9a-f]{4}", line):
line = line.strip()
- products += " { 0x%s%s, \"%s\" },\n"%(last_vendor, line[:4], re.sub("\"", "\\\"", re.sub("\?+", "?", line[4:].strip().replace("\\", "\\\\"))))
+ products += " { 0x%s%s, \"%s\" },\n"%(last_vendor, line[:4], re.sub("\"", "\\\"", re.sub("\?+", "?", repr(line[4:].strip())[1:-1].replace("\\", "\\\\"))))
vendors += """ { 0, NULL }\n};