From b4fa94959db039c7eca4531a5b9a41baffa8b4c8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 17 Apr 2020 18:09:05 -0600 Subject: patman: Tidy up sys.path changes Now that we are using absolute paths we can remove some of the sys.path mangling that appears in the tools. We only need to add the path to 'tools/' so that everything can find modules relative to that directory. The special paths for finding pylibfdt remain. Signed-off-by: Simon Glass --- tools/binman/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/binman') diff --git a/tools/binman/main.py b/tools/binman/main.py index 97a8a02034..efa7fa8386 100755 --- a/tools/binman/main.py +++ b/tools/binman/main.py @@ -20,8 +20,9 @@ import unittest # Bring in the patman and dtoc libraries (but don't override the first path # in PYTHONPATH) our_path = os.path.dirname(os.path.realpath(__file__)) -for dirname in ['../patman', '../dtoc', '../concurrencytest', '..']: - sys.path.insert(2, os.path.realpath(os.path.join(our_path, dirname))) +sys.path.insert(2, os.path.join(our_path, '..')) + +from patman import test_util # Bring in the libfdt module sys.path.insert(2, 'scripts/dtc/pylibfdt') -- cgit