diff options
-rw-r--r-- | tools/binman/entry_test.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py index 1f7ff5b4e4..b30a7beecc 100644 --- a/tools/binman/entry_test.py +++ b/tools/binman/entry_test.py @@ -41,7 +41,11 @@ class TestEntry(unittest.TestCase): del sys.modules['importlib'] global entry if entry: - reload(entry) + if sys.version_info[0] >= 3: + import importlib + importlib.reload(entry) + else: + reload(entry) else: import entry entry.Entry.Create(None, self.GetNode(), 'u-boot-spl') |