Merge pull request #52500 from terminalmage/invalid-archive-source

Fix traceback when invalid source passed to archive.extracted
This commit is contained in:
Shane Lee 2019-04-11 10:12:23 -06:00 committed by GitHub
commit 6e79e242c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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