X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fbinman%2Fbinman.py;h=e75a59d9517d23304a6b7fd7f9c680ad659a7d5e;hb=9c0a8b1f44a18343acb48a7b6cf6ec724a7fac93;hp=e1cb2fbb6f077b664a614ec15e40f77198e31f8d;hpb=80d2ae5e1f14c6caf96c9eb6cb68e8f68b2e5788;p=oweals%2Fu-boot.git diff --git a/tools/binman/binman.py b/tools/binman/binman.py index e1cb2fbb6f..e75a59d951 100755 --- a/tools/binman/binman.py +++ b/tools/binman/binman.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2016 Google, Inc # Written by Simon Glass @@ -17,12 +17,14 @@ import unittest # Bring in the patman and dtoc libraries our_path = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(os.path.join(our_path, '../patman')) -sys.path.append(os.path.join(our_path, '../dtoc')) -sys.path.append(os.path.join(our_path, '../')) +for dirname in ['../patman', '../dtoc', '..']: + sys.path.insert(0, os.path.join(our_path, dirname)) + +# Bring in the libfdt module +sys.path.insert(0, 'scripts/dtc/pylibfdt') # Also allow entry-type modules to be brought in from the etype directory. -sys.path.append(os.path.join(our_path, 'etype')) +sys.path.insert(0, os.path.join(our_path, 'etype')) import cmdline import command