- if val in command:
- self.put(ss, es, self.out_ann,
- [0, ['Function command: 0x%02x \'%s\''
- % (val, command[val])]])
- self.state = command[val].upper()
- else:
- self.put(ss, es, self.out_ann,
- [0, ['Function command: 0x%02x \'%s\''
- % (val, 'unrecognized')]])
- self.state = 'UNRECOGNIZED'
+ if val not in command:
+ self.putx([0, ['Unrecognized command: 0x%02x' % val]])
+ return
+ self.putx([0, ['Function command: 0x%02x \'%s\''
+ % (val, command[val])]])
+ self.state = command[val].upper()