Don't die comparing 'Low Voltage Z' with 'ZLowVoltage' in picoforce driver
authorW. Trevor King <wking@drexel.edu>
Sat, 7 Aug 2010 01:19:47 +0000 (21:19 -0400)
committerW. Trevor King <wking@drexel.edu>
Sat, 7 Aug 2010 01:19:47 +0000 (21:19 -0400)
hooke/driver/picoforce.py

index 1f034dab8abea300358aa51aac397a07c31c1d43..bffa09ef337d80feeb93efbea70ab5af3c894c01 100644 (file)
@@ -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