mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
gitfs: fix UnboundLocalError for 'msg'
When using an invalid gitfs configuration parameter, the following error happened: [CRITICAL] Invalid gitfs configuration parameter 'foo' in remote https://example.com/. Valid parameters are: base, mountpoint, root, ssl_verify, name. [ERROR ] An un-handled exception was caught by salt's global exception handler: UnboundLocalError: local variable 'msg' referenced before assignment Traceback (most recent call last): File "/usr/bin/salt-call", line 11, in <module> salt_call() … File "/usr/lib/python2.7/dist-packages/salt/utils/gitfs.py", line 202, in __init__ msg += ( UnboundLocalError: local variable 'msg' referenced before assignment
This commit is contained in:
parent
9805bdeddf
commit
e70cbda490
1 changed files with 2 additions and 1 deletions
|
@ -189,7 +189,7 @@ class GitProvider(object):
|
|||
)
|
||||
log.critical(msg)
|
||||
else:
|
||||
log.critical(
|
||||
msg = (
|
||||
'Invalid {0} configuration parameter \'{1}\' in '
|
||||
'remote {2}. Valid parameters are: {3}.'.format(
|
||||
self.role,
|
||||
|
@ -203,6 +203,7 @@ class GitProvider(object):
|
|||
' See the GitFS Walkthrough in the Salt '
|
||||
'documentation for further information.'
|
||||
)
|
||||
log.critical(msg)
|
||||
|
||||
per_remote_errors = True
|
||||
if per_remote_errors:
|
||||
|
|
Loading…
Add table
Reference in a new issue