Skip to content

Commit

Permalink
got to log warning
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcmarrow authored and s0undt3ch committed May 4, 2023
1 parent 5867b2d commit f122899
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions salt/states/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2953,7 +2953,7 @@ def managed(
and not source.lower().startswith(("http:", "ftp:"))
and source_hash
):
return _error(ret, "source_hash can only be used with 'http' or 'ftp'")
log.warning("source_hash is only used with 'http' or 'ftp'")

# If no source is specified, set replace to False, as there is nothing
# with which to replace the file.
Expand Down Expand Up @@ -6012,7 +6012,7 @@ def blockreplace(
and not source.lower().startswith(("http:", "ftp:"))
and source_hash
):
return _error(ret, "source_hash can only be used with 'http' or 'ftp'")
log.warning("source_hash is only used with 'http' or 'ftp'")

if sources is None:
sources = []
Expand Down Expand Up @@ -6455,7 +6455,7 @@ def append(
and not source.lower().startswith(("http:", "ftp:"))
and source_hash
):
return _error(ret, "source_hash can only be used with 'http' or 'ftp'")
log.warning("source_hash is only used with 'http' or 'ftp'")

name = os.path.expanduser(name)

Expand Down Expand Up @@ -6746,7 +6746,7 @@ def prepend(
and not source.lower().startswith(("http:", "ftp:"))
and source_hash
):
return _error(ret, "source_hash can only be used with 'http' or 'ftp'")
log.warning("source_hash is only used with 'http' or 'ftp'")

if sources is None:
sources = []
Expand Down

0 comments on commit f122899

Please sign in to comment.