From 8d12caeb3e1e0c49585f33fc9b4b104d2ddbb061 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Sat, 6 Apr 2013 07:05:35 -0700 Subject: [PATCH] make readelf.py pick up local elftools before system one --- scripts/readelf.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/readelf.py b/scripts/readelf.py index 69ad480..64d0174 100755 --- a/scripts/readelf.py +++ b/scripts/readelf.py @@ -11,12 +11,9 @@ import os, sys from optparse import OptionParser import string -# If elftools is not installed, maybe we're running from the root or scripts -# dir of the source distribution -try: - import elftools -except ImportError: - sys.path.extend(['.', '..']) +# If we're running from the root of the development directory, elftools should +# be loaded from there. +sys.path.insert(0, '.') from elftools import __version__ from elftools.common.exceptions import ELFError -- 2.30.2