1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-04 19:26:58 +00:00

module utils: update code to python3 (#10907)

* module utils: update code to python3

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-12 00:42:11 +13:00 committed by GitHub
parent ce544f370c
commit cc83188594
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 83 additions and 77 deletions

View file

@ -52,7 +52,7 @@ def initialize_dialect(dialect, **kwargs):
def read_csv(data, dialect, fieldnames=None):
BOM = to_native(u'\ufeff')
BOM = to_native('\ufeff')
data = to_native(data, errors='surrogate_or_strict')
if data.startswith(BOM):
data = data[len(BOM):]