diff --git a/binaries/opae.io/main.cpp b/binaries/opae.io/main.cpp index e542b5fa2ceb..c6ef3e30077e 100644 --- a/binaries/opae.io/main.cpp +++ b/binaries/opae.io/main.cpp @@ -432,12 +432,9 @@ int main(int argc, char *argv[]) std::cerr << pyerr.what() << std::endl; return rc; } - } else if (pyerr.matches(PyExc_TypeError)) { - std::cerr << "No suitable accelerator device found." << std::endl; - return 2; } else { std::cerr << pyerr.what() << std::endl; - return 3; + return 2; } } if (!cli->is_interactive()) { diff --git a/binaries/opae.io/pymain.h b/binaries/opae.io/pymain.h index d5eae6c86fdb..0fa84574e121 100644 --- a/binaries/opae.io/pymain.h +++ b/binaries/opae.io/pymain.h @@ -233,7 +233,7 @@ class script_action(base_action): with open(args.script_file) as f: sys.argv = [args.script_file] + args.script_args - exec(f.read(), globals=dict(globals()), locals={}) + exec(f.read(), dict(globals()), {}) raise SystemExit(0) diff --git a/binaries/opae.io/scripts/walk.py b/binaries/opae.io/scripts/walk.py index 6e1b202421f0..7b315082fc82 100644 --- a/binaries/opae.io/scripts/walk.py +++ b/binaries/opae.io/scripts/walk.py @@ -1,4 +1,4 @@ -## Copyright(c) 2020, Intel Corporation +## Copyright(c) 2020-2023, Intel Corporation ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: @@ -26,5 +26,5 @@ from opae.io.utils import dfh_walk -for offset, dfh in dfh_walk(): +for offset, dfh in dfh_walk(region=the_region): print('offset: 0x{:0x}\n{}'.format(offset, dfh))