From 296a774e7234dc78da3d2f25c0e03770cb2a9cd8 Mon Sep 17 00:00:00 2001 From: Tadeas Pilar Date: Tue, 19 Sep 2023 11:08:54 +0200 Subject: [PATCH] tools/pydfu: Raise exception when uploading binary without address. Signed-off-by: Tadeas Pilar --- tools/pydfu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pydfu.py b/tools/pydfu.py index 23dd628f06..1d8be7ffde 100644 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -624,7 +624,7 @@ def main(): if args.path: if str(args.path).endswith(".bin"): if not args.address: - return + raise ValueError("Address must be specified using -a when uploading binary") addr = str(args.address) if addr.startswith("0x") or addr.startswith("0X"): addr = int(addr, 16)