When using disk_layout files but not config file, we autofill the harddrives argument (#1067)

This commit is contained in:
Werner Llácer 2022-04-25 08:41:20 +02:00 committed by GitHub
parent 99dfa7368d
commit 15c594bcba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -230,6 +230,8 @@ def post_process_arguments(arguments):
if not json_stream_to_structure('--disk_layouts',arguments['disk_layouts'],layout_storage):
exit(1)
else:
if arguments.get('harddrives') is None:
arguments['harddrives'] = [disk for disk in layout_storage]
# backward compatibility. Change partition.format for partition.wipe
for disk in layout_storage:
for i,partition in enumerate(layout_storage[disk].get('partitions',[])):