diff --git a/README.md b/README.md index 945e21e..8239b03 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ No command line options are required for default behavior. The following command HTTP basic authentication password (default: None) --ignore_ssl HTTPS ignore SSL certificate errors (default: False) +If `--config_type http` is selected, pass the URL in the `--config_location` parameter + ## Windows Installation You **MUST** install virt-viewer prior to using PVE VDI client, you may download it from the [official Virtual Machine Manager](https://virt-manager.org/download.html) site. diff --git a/vdiclient.py b/vdiclient.py index a74bfa9..8ddd36e 100644 --- a/vdiclient.py +++ b/vdiclient.py @@ -81,6 +81,9 @@ def loadconfig(config_location = None, config_type='file', config_username = Non win_popup_button(f'Unable to read configuration file:\n{e!r}', 'OK') return False elif config_type == 'http': + if not config_location: + win_popup_button('--config_type http defined, yet no URL provided in --config_location parameter!', 'OK') + return False try: if config_username and config_password: r = requests.get(url=config_location, auth=(config_username, config_password), verify = ssl_verify) @@ -91,7 +94,7 @@ def loadconfig(config_location = None, config_type='file', config_username = Non win_popup_button(f"Unable to read configuration from URL!\n{e}", "OK") return False if not 'General' in config: - win_popup_button(f'Unable to read supplied configuration:\nNo `General` section defined!', 'OK') + win_popup_button('Unable to read supplied configuration:\nNo `General` section defined!', 'OK') return False else: if 'title' in config['General']: