From c3c55f59928a6b07739114aa4e25713051bbbcca Mon Sep 17 00:00:00 2001 From: Yash Tripathi Date: Fri, 28 May 2021 08:44:28 +0530 Subject: added support for setting mirror-region to a dict or a string in config --- examples/guided.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index 320bcfd8..b26887a5 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -448,8 +448,11 @@ else: else: archinstall.arguments['profile'] = None if archinstall.arguments.get('mirror-region', None) is not None: - selected_region = archinstall.arguments.get('mirror-region', None) - archinstall.arguments['mirror-region'] = {selected_region: archinstall.list_mirrors()[selected_region]} + if type(archinstall.arguments.get('mirror-region', None)) is dict: + archinstall.arguments['mirror-region'] = archinstall.arguments.get('mirror-region', None) + else: + selected_region = archinstall.arguments.get('mirror-region', None) + archinstall.arguments['mirror-region'] = {selected_region: archinstall.list_mirrors()[selected_region]} archinstall.arguments['sys-language'] = archinstall.arguments.get('sys-language', 'en_US') archinstall.arguments['sys-encoding'] = archinstall.arguments.get('sys-encoding', 'utf-8') if archinstall.arguments.get('gfx_driver', None) is not None: -- cgit v1.2.3-70-g09d2 From 3aee3611c4081272c622a86f09bbd1c8c382b098 Mon Sep 17 00:00:00 2001 From: Yash Tripathi Date: Fri, 28 May 2021 08:50:27 +0530 Subject: added support for setting profile to a dict or a string in config --- examples/guided.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index b26887a5..42429370 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -444,7 +444,10 @@ else: archinstall.arguments['harddrive'].keep_partitions = False # Temporary workaround to make Desktop Environments work if archinstall.arguments.get('profile', None) is not None: - archinstall.arguments['profile'] = archinstall.Profile(None, archinstall.arguments.get('profile', None)) + if type(archinstall.arguments.get('profile', None)) is dict: + archinstall.arguments['profile'] = archinstall.Profile(None, archinstall.arguments.get('profile', None)['path']) + else: + archinstall.arguments['profile'] = archinstall.Profile(None, archinstall.arguments.get('profile', None)) else: archinstall.arguments['profile'] = None if archinstall.arguments.get('mirror-region', None) is not None: -- cgit v1.2.3-70-g09d2