mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Use bytes rather than native string for result (#46281)
This prevents a stack trace in Python 3 when the result is an empty file since the file is open in binary mode and a native string in Python 3 is str, not bytes.
This commit is contained in:
2
changelogs/fragments/blockinfile-bytes-fix.yaml
Normal file
2
changelogs/fragments/blockinfile-bytes-fix.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- blockinfile - use bytes rather than a native string to prevent a stacktrace in Python 3 when writing to the file (https://github.com/ansible/ansible/issues/46237)
|
||||
Reference in New Issue
Block a user