Allow parsing of a two dimensional list for controlling the order of headers

There's actually a bit more pythonic way of doing this: use a generator (from http://stackoverflow.com/questions/7006839/alternative-to-list-comprehension-if-there-will-be-only-one-result). This will stop on the first match in the list comprehension, and also allows you to specify a default:

actionid = next((value for header,value in message if str(header.lower()) == 'actionid'), self.generateActionId())


Using