Merge pull request #9447 from cachedout/exception-handling-file

Handle a possible exception
This commit is contained in:
Pedro Algarvio 2013-12-26 07:57:43 -08:00
commit f54736aab6

View File

@ -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