mirror of https://github.com/ARMmbed/mbed-os.git
Clean up formatting of device_management.py
parent
93309cd134
commit
a6163cb14f
|
|
@ -42,12 +42,15 @@ sys.path.insert(0, ROOT)
|
|||
from tools.config import Config
|
||||
from tools.options import extract_mcus
|
||||
|
||||
|
||||
class MbedExtendedArgs(MainArgumentParser):
|
||||
def _addCreateArgs(self, parser, exclusions=[]):
|
||||
if 'payload' not in exclusions:
|
||||
parser.add_argument('-p', '--payload',
|
||||
parser.add_argument(
|
||||
'-p', '--payload',
|
||||
help='Supply a local copy of the payload file.'
|
||||
'This option overrides any payload file supplied in a `-i` argument.',
|
||||
'This option overrides any payload file supplied in a '
|
||||
'`-i` argument.',
|
||||
metavar='FILE',
|
||||
type=argparse.FileType('rb')
|
||||
)
|
||||
|
|
@ -61,10 +64,7 @@ class MbedExtendedArgs(MainArgumentParser):
|
|||
|
||||
def wrap_payload(func):
|
||||
def inner(options):
|
||||
if (not options.payload and
|
||||
options.mcu and
|
||||
options.build
|
||||
):
|
||||
if not options.payload and options.mcu and options.build:
|
||||
mcus = extract_mcus(MbedExtendedArgs(), options)
|
||||
sources = options.source_dir or ['.']
|
||||
config = Config(mcus[0], sources)
|
||||
|
|
|
|||
Loading…
Reference in New Issue