diff --git a/tools/dump2bin b/tools/dump2bin index c7ab3603..48d7dcb3 100755 --- a/tools/dump2bin +++ b/tools/dump2bin @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import argparse -import os, sys +import sys from lib.dump import decode_dump @@ -21,7 +21,7 @@ def main(): # decode the dump data dump = decode_dump(args.dump) if dump is None: - return os.EX_DATAERR + return 1 # output descriptors if args.info: diff --git a/tools/elf_mem_map b/tools/elf_mem_map index 7e40f4f9..580ed512 100755 --- a/tools/elf_mem_map +++ b/tools/elf_mem_map @@ -4,7 +4,6 @@ import elftools.elf.elffile import elftools.dwarf.descriptions from collections import namedtuple from struct import unpack -import os import re from lib.dump import decode_dump @@ -374,7 +373,7 @@ def main(): # fetch the memory data dump = decode_dump(args.dump) if dump is None: - return os.EX_DATAERR + return 1 # strip padding, if present addr_start = dump.ranges[0][0] diff --git a/tools/xfimg2dump b/tools/xfimg2dump index e1fe75ac..d0cb23cb 100755 --- a/tools/xfimg2dump +++ b/tools/xfimg2dump @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import argparse import struct -import os, sys +import sys from lib.dump import DUMP_MAGIC, DUMP_OFFSET, DUMP_SIZE @@ -25,13 +25,13 @@ def main(): data = fd.read(DUMP_SIZE) if len(data) != DUMP_SIZE: error('incorrect image size') - return os.EX_DATAERR + return 1 # check for magic header magic, = struct.unpack('