From 229826c53d8a6f0d5db05294a99335da4a49544e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 6 Aug 2010 21:19:47 -0400 Subject: [PATCH] Don't die comparing 'Low Voltage Z' with 'ZLowVoltage' in picoforce driver --- hooke/driver/picoforce.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hooke/driver/picoforce.py b/hooke/driver/picoforce.py index 1f034da..bffa09e 100644 --- a/hooke/driver/picoforce.py +++ b/hooke/driver/picoforce.py @@ -212,8 +212,12 @@ class PicoForceDriver (Driver): match = type_re.match(image['@4:Image Data']) assert match != None, 'Bad regexp for %s, %s' \ % ('@4:Image Data', image['@4:Image Data']) - assert match.group(1).lower() == match.group(2).replace(' ','').lower(), \ - 'Name missmatch: "%s", "%s"' % (match.group(1), match.group(2)) + if version == '0x06130001' and match.group(1) == 'ZLowVoltage': + assert match.group(2) == 'Low Voltage Z', \ + 'Name missmatch: "%s", "%s"' % (match.group(1), match.group(2)) + else: + assert match.group(1).lower() == match.group(2).replace(' ','').lower(), \ + 'Name missmatch: "%s", "%s"' % (match.group(1), match.group(2)) tname = match.group(2) else: assert version == '0x07200000', version -- 2.26.2