# HG changeset patch # User Jacob Alexander # Date 1431297711 25200 # Node ID 562640af424dd84437dc76ee9ae7fe14523af830 # Parent 159d6ede7ed39f1fef4c1416194fadf92d3a17ac Adding incorrect hid code lookup error detection. diff -r 159d6ede7ed3 -r 562640af424d kll.py --- a/kll.py Sun May 10 15:32:15 2015 -0700 +++ b/kll.py Sun May 10 15:41:51 2015 -0700 @@ -466,11 +466,15 @@ for sequence in range( 0, len( items[ variant ] ) ): for combo in range( 0, len( items[ variant ][ sequence ] ) ): if items[ variant ][ sequence ][ combo ][0] in backend.requiredCapabilities.keys(): - # Use backend capability name and a single argument - items[ variant ][ sequence ][ combo ] = tuple( - [ backend.capabilityLookup( items[ variant ][ sequence ][ combo ][0] ), - tuple( [ hid_lookup_dictionary[ items[ variant ][ sequence ][ combo ] ] ] ) ] - ) + try: + # Use backend capability name and a single argument + items[ variant ][ sequence ][ combo ] = tuple( + [ backend.capabilityLookup( items[ variant ][ sequence ][ combo ][0] ), + tuple( [ hid_lookup_dictionary[ items[ variant ][ sequence ][ combo ] ] ] ) ] + ) + except KeyError: + print ( "{0} {1} is an invalid HID lookup value".format( ERROR, items[ variant ][ sequence ][ combo ] ) ) + sys.exit( 1 ) return items