mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #8334 from theotherjimmy/error-missing-payload
mbed dm: Check for missing payload and give a better error messagepull/8404/head
commit
7ea50f1fe4
|
@ -82,6 +82,9 @@ def wrap_payload(func):
|
|||
app_name = config.name or basename(abspath(sources[0]))
|
||||
payload_name = join(options.build, generate_update_filename(app_name, config.target))
|
||||
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