Skip to content

Commit 7ea50f1

Browse files
author
Cruz Monrreal
authored
Merge pull request #8334 from theotherjimmy/error-missing-payload
mbed dm: Check for missing payload and give a better error message
2 parents 285de88 + eb86233 commit 7ea50f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/device_management.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def inner(options):
8282
app_name = config.name or basename(abspath(sources[0]))
8383
payload_name = join(options.build, generate_update_filename(app_name, config.target))
8484
options.payload = open(payload_name, "rb")
85+
if not options.payload:
86+
LOG.error("No Payload specified. Please use \"-t\" and \"-m\" or \"-p\" to specify a payload ")
87+
exit(1)
8588
return func(options)
8689
return inner
8790

0 commit comments

Comments
 (0)