Remove unused import
[pyelftools.git] / examples / dwarf_range_lists.py
index c310e584f125d50c392d6a973bc8f276a59e3865..fced6a6a1b36a83f8c23cacbfc8f1199c2a97f9f 100644 (file)
@@ -1,7 +1,7 @@
 #-------------------------------------------------------------------------------
 # elftools example: dwarf_range_lists.py
 #
-# Examine DIE entries which have range list values, and decode these range 
+# Examine DIE entries which have range list values, and decode these range
 # lists.
 #
 # Eli Bendersky (eliben@gmail.com)
 from __future__ import print_function
 import sys
 
-# If elftools is not installed, maybe we're running from the root or examples
-# dir of the source distribution
-try:
-    import elftools
-except ImportError:
-    sys.path.extend(['.', '..'])
+# If pyelftools is not installed, the example can also run from the root or
+# examples/ dir of the source distribution.
+sys.path[0:0] = ['.', '..']
 
 from elftools.common.py3compat import itervalues
 from elftools.elf.elffile import ELFFile