From: Eli Bendersky Date: Sat, 6 Apr 2013 14:05:35 +0000 (-0700) Subject: make readelf.py pick up local elftools before system one X-Git-Tag: v0.21~8 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d12caeb3e1e0c49585f33fc9b4b104d2ddbb061;p=pyelftools.git make readelf.py pick up local elftools before system one --- 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