mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-26 08:26:28 +00:00
Trnasform file name to bytes before opening it to avoid unicode errors if python tries to encode it implicitly
This commit is contained in:
@@ -329,7 +329,7 @@ class DataLoader():
|
||||
real_path = self.path_dwim(file_path)
|
||||
|
||||
try:
|
||||
with open(real_path, 'rb') as f:
|
||||
with open(to_bytes(real_path), 'rb') as f:
|
||||
data = f.read()
|
||||
if self._vault.is_encrypted(data):
|
||||
# if the file is encrypted and no password was specified,
|
||||
|
||||
Reference in New Issue
Block a user