mirror of https://github.com/ARMmbed/mbed-os.git
mbed dm: Check for missing payload and give a better error message
### Description
The error message when you invoke `mbed dm update prepare` without a payload
is particularly obtuse, and provides a user with no indication that the
payload is missing. This change makes that error message not stink.
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
pull/8334/head
parent
1af1a4a443
commit
eb86233a11
|
|
@ -83,6 +83,9 @@ def wrap_payload(func):
|
|||
app_name, output_ext
|
||||
))
|
||||
options.payload = open(payload_name, "rb")
|
||||
if not options.payload:
|
||||
LOG.error("No Payload specified. Please use \"-t\" and \"-m\" or \"-p\" to specify a payload ")
|
||||
exit(1)
|
||||
return func(options)
|
||||
return inner
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue