tools/pydfu: Raise exception when uploading binary without address.

Signed-off-by: Tadeas Pilar <tadeas.pilar@prusa3d.cz>
pull/12470/head
Tadeas Pilar 2023-09-19 11:08:54 +02:00
rodzic b773507443
commit 296a774e72
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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)