mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #9447 from cachedout/exception-handling-file
Handle a possible exception
This commit is contained in:
commit
f54736aab6
@ -1592,7 +1592,12 @@ def recurse(name,
|
||||
# No need to set __env__ = env since that's done in the state machinery
|
||||
|
||||
# Verify the source exists.
|
||||
_src_proto, _src_path = source.split('://', 1)
|
||||
try:
|
||||
_src_proto, _src_path = source.split('://', 1)
|
||||
except ValueError:
|
||||
ret['result'] = False
|
||||
ret['comment'] = 'Could not parse source!\nDid you remember to specify a protocol like salt:// ?'
|
||||
return ret
|
||||
|
||||
if not _src_path:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user