mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Special check specifically for bytes types
This commit is contained in:
parent
ee90dd5d95
commit
e4182715be
1 changed files with 3 additions and 1 deletions
|
@ -2269,7 +2269,9 @@ def managed(name,
|
|||
.format(contents_id)
|
||||
)
|
||||
|
||||
if isinstance(use_contents, six.string_types) and str('\0') in use_contents:
|
||||
if isinstance(use_contents, bytes) and b'\0' in use_contents:
|
||||
contents = use_contents
|
||||
elif isinstance(use_contents, six.string_types) and str('\0') in use_contents:
|
||||
contents = use_contents
|
||||
else:
|
||||
validated_contents = _validate_str_list(use_contents)
|
||||
|
|
Loading…
Add table
Reference in a new issue