Skip to content

Commit

Permalink
Merge pull request #49087 from dwoz/url_file_test_fixes
Browse files Browse the repository at this point in the history
Filter out scheme's that are not valid
  • Loading branch information
dwoz committed Aug 13, 2018
2 parents db5fb32 + 632b65f commit 274977b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion salt/modules/file.py
Expand Up @@ -3886,7 +3886,10 @@ def _get_local_file_source_sum(path):
# If we have a source defined, let's figure out what the hash is
if source:
urlparsed_source = _urlparse(source)
parsed_scheme = urlparsed_source.scheme
if urlparsed_source.scheme in salt.utils.files.VALID_PROTOS:
parsed_scheme = urlparsed_source.scheme
else:
parsed_scheme = ''
parsed_path = os.path.join(
urlparsed_source.netloc, urlparsed_source.path).rstrip(os.sep)
unix_local_source = parsed_scheme in ('file', '')
Expand Down

0 comments on commit 274977b

Please sign in to comment.