scripts: add version check for pyelftools
Versions before 0.24 have string handling issues in Python 3. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
0e7067c6be
commit
3aecba10f7
2 changed files with 12 additions and 0 deletions
|
@ -8,9 +8,15 @@ import argparse
|
|||
import sys
|
||||
import struct
|
||||
import os
|
||||
import elftools
|
||||
from distutils.version import LooseVersion
|
||||
from elftools.elf.elffile import ELFFile
|
||||
from elftools.elf.sections import SymbolTableSection
|
||||
|
||||
if LooseVersion(elftools.__version__) < LooseVersion('0.24'):
|
||||
sys.stderr.write("pyelftools is out of date, need version 0.24 or later\n")
|
||||
sys.exit(1)
|
||||
|
||||
def debug(text):
|
||||
if not args.verbose:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue