From 1d980f33ce4e75c93e0e4a9be4f53b99098d9c77 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Thu, 24 Aug 2023 20:01:18 +0000 Subject: [PATCH] bindings: (fixes #948) Rollback the file encoding changes made to ns__init__.py Fixes issue introduced in 20ae6fb2d06078b85f6dd9a84137dfc5fb294b1c --- bindings/python/ns__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/ns__init__.py b/bindings/python/ns__init__.py index 6738d0d58..f0f3c5d20 100644 --- a/bindings/python/ns__init__.py +++ b/bindings/python/ns__init__.py @@ -155,7 +155,7 @@ def extract_linked_libraries(library_name: str, prefix: str) -> tuple: linked_libs = [] # First discover which 3rd-party libraries are used by the current module try: - with open(os.path.abspath(library_path), "rb", encoding="utf-8") as f: + with open(os.path.abspath(library_path), "rb") as f: linked_libs = re.findall(b"\x00(lib.*?.%b)" % LIBRARY_EXTENSION.encode("utf-8"), f.read()) except Exception as e: print("Failed to extract libraries used by {library} with exception:{exception}"