index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/__init__.py | 21 |
diff --git a/archinstall/__init__.py b/archinstall/__init__.py index 536db370..aa644d48 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -149,22 +149,13 @@ def get_arguments() -> Dict[str, Any]: # preprocess the json files. # TODO Expand the url access to the other JSON file arguments ? if args.config is not None: - try: - # First, let's check if this is a URL scheme instead of a filename - parsed_url = urllib.parse.urlparse(args.config) - - if not parsed_url.scheme: # The Profile was not a direct match on a remote URL, it must be a local file. - if not json_stream_to_structure('--config',args.config,config): - exit(1) - else: # Attempt to load the configuration from the URL. - with urllib.request.urlopen(urllib.request.Request(args.config, headers={'User-Agent': 'ArchInstall'})) as response: - config.update(json.loads(response.read())) - except Exception as e: - raise ValueError(f"Could not load --config because: {e}") + if not json_stream_to_structure('--config', args.config, config): + exit(1) - if args.creds is not None: - if not json_stream_to_structure('--creds',args.creds,config): - exit(1) + if args.creds is not None: + if not json_stream_to_structure('--creds', args.creds, config): + exit(1) + # load the parameters. first the known, then the unknowns config.update(vars(args)) config.update(parse_unspecified_argument_list(unknowns)) |