mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 20:38:10 +00:00
src/trezor/loop: cleanup signal in case of task failure
This commit is contained in:
parent
886888b775
commit
f9c51af32f
@ -201,6 +201,13 @@ class signal(Syscall):
|
||||
self.task = None
|
||||
self.value = _NO_VALUE
|
||||
|
||||
def __iter__(self):
|
||||
try:
|
||||
return (yield self)
|
||||
except:
|
||||
self.task = None
|
||||
raise
|
||||
|
||||
|
||||
class wait(Syscall):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user