From: W. Trevor King Date: Sat, 7 Aug 2010 01:19:47 +0000 (-0400) Subject: Don't die comparing 'Low Voltage Z' with 'ZLowVoltage' in picoforce driver X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=229826c53d8a6f0d5db05294a99335da4a49544e;p=hooke.git Don't die comparing 'Low Voltage Z' with 'ZLowVoltage' in picoforce driver --- 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