Do not set openstack env var to blank string

This commit is contained in:
Alan Rominger 2021-04-22 11:29:26 -04:00
parent 29c961e52a
commit ae320ab228
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559

View File

@ -1531,7 +1531,7 @@ class RunJob(BaseTask):
# Set environment variables for cloud credentials.
cred_files = private_data_files.get('credentials', {})
for cloud_cred in job.cloud_credentials:
if cloud_cred and cloud_cred.credential_type.namespace == 'openstack':
if cloud_cred and cloud_cred.credential_type.namespace == 'openstack' and cred_files.get(cloud_cred, ''):
env['OS_CLIENT_CONFIG_FILE'] = to_container_path(cred_files.get(cloud_cred, ''), private_data_dir)
for network_cred in job.network_credentials: