From 95619f98ef3e96e1635321fb8091333044c525ad Mon Sep 17 00:00:00 2001 From: Christian Vogelgsang Date: Wed, 3 Jan 2024 08:56:45 +0100 Subject: [PATCH] romtool: issue an error/warning if ROM was not written --- amitools/tools/romtool.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/amitools/tools/romtool.py b/amitools/tools/romtool.py index 16f074f3..c2e41b50 100644 --- a/amitools/tools/romtool.py +++ b/amitools/tools/romtool.py @@ -53,6 +53,7 @@ def do_split_cmd(args): # no output dir? end now out_path = args.output_dir if out_path is None: + logging.error("No -o output given. Can't split ROM!") return 0 # get modules to export if args.modules is None: @@ -210,6 +211,8 @@ def do_build_cmd(args): logging.info("saving ROM to '%s'", output) with open(output, "wb") as fh: fh.write(rom_data) + else: + logging.warn("No output -o given! ROM not saved!") return 0 @@ -341,6 +344,8 @@ def do_patch_cmd(args): logging.info("saving ROM to '%s'", output) with open(output, "wb") as fh: fh.write(rom_data) + else: + logging.warn("No output -o given! ROM not saved!") return 0 @@ -393,6 +398,8 @@ def do_combine_cmd(args): logging.info("saving ROM to '%s'", output) with open(output, "wb") as fh: fh.write(rom_img) + else: + logging.warn("No output -o given! ROM not saved!") return 0