Skip to content

Commit a6163cb

Browse files
committed
Clean up formatting of device_management.py
1 parent 93309cd commit a6163cb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tools/device_management.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434

3535
LOG = logging.getLogger(__name__)
36-
LOG_FORMAT='[%(levelname)s] %(asctime)s - %(name)s - %(message)s'
36+
LOG_FORMAT = '[%(levelname)s] %(asctime)s - %(name)s - %(message)s'
3737

3838
# Be sure that the tools directory is in the search path
3939
ROOT = abspath(join(dirname(__file__), ".."))
@@ -42,12 +42,15 @@
4242
from tools.config import Config
4343
from tools.options import extract_mcus
4444

45+
4546
class MbedExtendedArgs(MainArgumentParser):
4647
def _addCreateArgs(self, parser, exclusions=[]):
4748
if 'payload' not in exclusions:
48-
parser.add_argument('-p', '--payload',
49+
parser.add_argument(
50+
'-p', '--payload',
4951
help='Supply a local copy of the payload file.'
50-
'This option overrides any payload file supplied in a `-i` argument.',
52+
'This option overrides any payload file supplied in a '
53+
'`-i` argument.',
5154
metavar='FILE',
5255
type=argparse.FileType('rb')
5356
)
@@ -61,10 +64,7 @@ def _addCreateArgs(self, parser, exclusions=[]):
6164

6265
def wrap_payload(func):
6366
def inner(options):
64-
if (not options.payload and
65-
options.mcu and
66-
options.build
67-
):
67+
if not options.payload and options.mcu and options.build:
6868
mcus = extract_mcus(MbedExtendedArgs(), options)
6969
sources = options.source_dir or ['.']
7070
config = Config(mcus[0], sources)
@@ -146,7 +146,7 @@ def main():
146146
"verify": verify.main,
147147
"cert": cert.main,
148148
"init": wrap_init(init.main),
149-
"update" : wrap_payload(update.main),
149+
"update": wrap_payload(update.main),
150150
}[options.action](options) or 0
151151

152152
sys.exit(rc)

0 commit comments

Comments
 (0)