mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
raise on registering conflicting message handler
This commit is contained in:
parent
788eb675a5
commit
43e6bc2f11
@ -6,6 +6,8 @@ message_handlers = {}
|
||||
|
||||
|
||||
def register(mtype, handler):
|
||||
if mtype in message_handlers:
|
||||
raise Exception('Message wire type %s is already registered', mtype)
|
||||
message_handlers[mtype] = handler
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user