mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #52500 from terminalmage/invalid-archive-source
Fix traceback when invalid source passed to archive.extracted
This commit is contained in:
commit
6e79e242c7
1 changed files with 5 additions and 0 deletions
|
@ -777,6 +777,11 @@ def extracted(name,
|
|||
ret['comment'] = exc.strerror
|
||||
return ret
|
||||
|
||||
if not source_match:
|
||||
ret['result'] = False
|
||||
ret['comment'] = 'Invalid source "{0}"'.format(source)
|
||||
return ret
|
||||
|
||||
urlparsed_source = _urlparse(source_match)
|
||||
urlparsed_scheme = urlparsed_source.scheme
|
||||
urlparsed_path = os.path.join(
|
||||
|
|
Loading…
Add table
Reference in a new issue