mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-04-10 10:51:14 +00:00
[backport/2.2] Fix for common non-ASCII characters in CRDs (#334)
Co-authored-by: Alessandro Rossi <4215912+kubealex@users.noreply.github.com>
This commit is contained in:
@@ -331,7 +331,7 @@ class K8sAnsibleMixin(object):
|
||||
if not os.path.exists(path):
|
||||
self.fail(msg="Error accessing {0}. Does the file exist?".format(path))
|
||||
try:
|
||||
with open(path, 'r') as f:
|
||||
with open(path, "rb") as f:
|
||||
result = list(yaml.safe_load_all(f))
|
||||
except (IOError, yaml.YAMLError) as exc:
|
||||
self.fail(msg="Error loading resource_definition: {0}".format(exc))
|
||||
|
||||
Reference in New Issue
Block a user