Make error more explicit when PKI dir not present for salt-call

This commit is contained in:
Erik Johnson 2017-04-28 13:20:38 -05:00
parent 1ea2885ec2
commit 3198ca8b19
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -567,8 +567,12 @@ class MinionBase(object):
break
except SaltClientError as exc:
last_exc = exc
msg = ('Master {0} could not be reached, trying '
'next master (if any)'.format(opts['master']))
if exc.strerror.startswith(
'Could not access {0}'.format(opts['pki_dir'])):
msg = exc.strerror
else:
msg = ('Master {0} could not be reached, trying '
'next master (if any)'.format(opts['master']))
log.info(msg)
continue