mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Fix incorrect logic in exception check
This commit is contained in:
parent
fed5041c5f
commit
6ba66cca41
@ -567,13 +567,12 @@ class MinionBase(object):
|
|||||||
break
|
break
|
||||||
except SaltClientError as exc:
|
except SaltClientError as exc:
|
||||||
last_exc = exc
|
last_exc = exc
|
||||||
pki_dirname = os.path.dirname(opts['pki_dir'])
|
if exc.strerror.startswith('Could not access'):
|
||||||
if exc.strerror.startswith(
|
msg = (
|
||||||
'Failed to initiate connection with Master '
|
'Failed to initiate connection with Master '
|
||||||
'{0} because the Minion could not access {1}. '
|
'{0}: check ownership/permissions. Error '
|
||||||
'Check ownership/permissions'.format(
|
'message: {1}'.format(opts['master'], exc)
|
||||||
opts['master'], pki_dirname)):
|
)
|
||||||
msg = exc.strerror
|
|
||||||
else:
|
else:
|
||||||
msg = ('Master {0} could not be reached, trying '
|
msg = ('Master {0} could not be reached, trying '
|
||||||
'next master (if any)'.format(opts['master']))
|
'next master (if any)'.format(opts['master']))
|
||||||
|
Loading…
Reference in New Issue
Block a user