mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 19:38:09 +00:00
src/trezor/utils: fix warnings in unimport_end
This commit is contained in:
parent
60bec0b4d1
commit
ebf4d2035e
@ -19,7 +19,8 @@ def unimport_end(mods):
|
||||
continue
|
||||
path = mod[:i]
|
||||
name = mod[i + 1:]
|
||||
delattr(sys.modules[path], name)
|
||||
if path in sys.modules:
|
||||
delattr(sys.modules[path], name)
|
||||
# collect removed modules
|
||||
gc.collect()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user