1
0
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:
Jan Pochyla 2018-04-05 17:01:21 +02:00
parent 60bec0b4d1
commit ebf4d2035e

View File

@ -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()