summaryrefslogtreecommitdiff
path: root/tools/binman/entry_test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-18 07:00:47 +0300
committerSimon Glass <sjg@chromium.org>2019-07-11 01:52:58 +0300
commit0199d19349ee0e5cc65dae4a453eb9c4074fb685 (patch)
treed901ea0afd8e94cad0ca2633ed661ef60556665d /tools/binman/entry_test.py
parentc6c10e77fb48f3e55857e379be86384fbcdc19d5 (diff)
downloadu-boot-0199d19349ee0e5cc65dae4a453eb9c4074fb685.tar.xz
binman: Update entry_test to support Python 3
The reload() function is in a different place in Python 3. Update the code to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry_test.py')
-rw-r--r--tools/binman/entry_test.py6
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')