mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use salt.utils.stringutils.is_binary to check if contents are binary
This commit is contained in:
parent
e3c969da81
commit
7b7dc94610
1 changed files with 1 additions and 3 deletions
|
@ -2269,9 +2269,7 @@ def managed(name,
|
|||
.format(contents_id)
|
||||
)
|
||||
|
||||
contents_are_binary = \
|
||||
isinstance(use_contents, six.string_types) and str('\0') in use_contents
|
||||
if contents_are_binary:
|
||||
if salt.utils.stringutils.is_binary(use_contents):
|
||||
contents = use_contents
|
||||
else:
|
||||
validated_contents = _validate_str_list(use_contents)
|
||||
|
|
Loading…
Add table
Reference in a new issue