From 1a7056efc40a336a855be353f549af0eb7e0fca9 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 15 Sep 2021 19:09:57 +0200 Subject: Might be redundant, but if the JSON file given to --config contains a list it will break the .split(), but if --harddrives is given as an argument, then we need to split. So adding a type-check --- examples/guided.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index a3c0db2d..e5cf2d38 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -29,7 +29,9 @@ archinstall.log(f"Disk states before installing: {archinstall.disk_layouts()}", def load_config(): if archinstall.arguments.get('harddrives', None) is not None: - archinstall.arguments['harddrives'] = [archinstall.BlockDevice(BlockDev) for BlockDev in archinstall.arguments['harddrives'].split(',')] + if type(archinstall.arguments['harddrives']) is str: + archinstall.arguments['harddrives'] = archinstall.arguments['harddrives'].split(',') + archinstall.arguments['harddrives'] = [archinstall.BlockDevice(BlockDev) for BlockDev in archinstall.arguments['harddrives']] # Temporarily disabling keep_partitions if config file is loaded # Temporary workaround to make Desktop Environments work if archinstall.arguments.get('profile', None) is not None: -- cgit v1.2.3-70-g09d2