mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-10-24 17:43:33 +00:00
Optimize code (tasks list initialization, task verification)
Signed-off-by: Przemek Stekiel <[email protected]>
This commit is contained in:
@@ -175,17 +175,15 @@ def main():
|
|||||||
|
|
||||||
result = True
|
result = True
|
||||||
|
|
||||||
tasks = []
|
|
||||||
if options.task == 'all':
|
if options.task == 'all':
|
||||||
for task in TASKS:
|
tasks = TASKS.keys()
|
||||||
tasks.append(task)
|
|
||||||
else:
|
else:
|
||||||
tasks = options.task.split(',')
|
tasks = options.task.split(',')
|
||||||
|
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
if task not in TASKS:
|
if task not in TASKS:
|
||||||
print('Error: invalid task: {}'.format(task))
|
print('Error: invalid task: {}'.format(task))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
for task in TASKS:
|
for task in TASKS:
|
||||||
if task in tasks:
|
if task in tasks:
|
||||||
|
|||||||
Reference in New Issue
Block a user