mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-17 03:48: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
|
continue
|
||||||
path = mod[:i]
|
path = mod[:i]
|
||||||
name = mod[i + 1:]
|
name = mod[i + 1:]
|
||||||
delattr(sys.modules[path], name)
|
if path in sys.modules:
|
||||||
|
delattr(sys.modules[path], name)
|
||||||
# collect removed modules
|
# collect removed modules
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user