Python 2 does not have a FileNotFoundError so drop it in favour of
simply printing out the last (and most informative) line of the
exception.
* benchtests/scripts/compare_strings.py: Import traceback.
(parse_file): Pretty-print error.
2018-08-02 Siddhesh Poyarekar <siddhesh@sourceware.org>
+ * benchtests/scripts/compare_strings.py: Import traceback.
+ (parse_file): Pretty-print error.
+
* NEWS: Mention the change.
* elf/dl-tunables.list: Rename tune namespace to cpu.
* sysdeps/powerpc/dl-tunables.list: Likewise.
import json
import pylab
import argparse
+import traceback
try:
import jsonschema as validator
bench = json.load(benchfile)
validator.validate(bench, schema)
return bench
- except FileNotFoundError:
- sys.stderr.write('Invalid input file %s.\n' % filename)
+ except:
+ print(traceback.format_exc(limit=1))
sys.exit(os.EX_NOINPUT)
def draw_graph(f, v, ifuncs, results):