Fix: return error when internal_tls_not_provided

When iinternal_tls is empty, prepare should works as usual

Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
DQ 2020-03-19 10:37:58 +08:00
parent cf90ec27f2
commit f18a546429

View File

@ -335,9 +335,9 @@ def parse_yaml_config(config_file_path, with_notary, with_clair, with_trivy, wit
config_dict['registry_username'] = REGISTRY_USER_NAME
config_dict['registry_password'] = generate_random_string(32)
internal_tls_config = configs['internal_tls']
internal_tls_config = configs.get('internal_tls')
# TLS related configs
if internal_tls_config.get('enabled'):
if internal_tls_config and internal_tls_config.get('enabled'):
config_dict['internal_tls'] = InternalTLS(
internal_tls_config['enabled'],
internal_tls_config['verify_client_cert'],