This is an automated email from the ASF dual-hosted git repository.

akitouni pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/buildstream-plugins.git


The following commit(s) were added to refs/heads/master by this push:
     new be1817d  Files need to be passed to tomli/tomllib in binary mode
     new 599eed3  Merge pull request #16 from nanonyme/nanonyme/tomli-fixes
be1817d is described below

commit be1817d649e277a17563db2b2c0e959ae2fef550
Author: Seppo Yli-Olli <[email protected]>
AuthorDate: Thu Jul 7 15:22:03 2022 +0300

    Files need to be passed to tomli/tomllib in binary mode
---
 src/buildstream_plugins/sources/cargo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buildstream_plugins/sources/cargo.py 
b/src/buildstream_plugins/sources/cargo.py
index f8ee4d5..fb143ac 100644
--- a/src/buildstream_plugins/sources/cargo.py
+++ b/src/buildstream_plugins/sources/cargo.py
@@ -382,7 +382,7 @@ class CargoSource(Source):
         lockfile = os.path.join(previous_sources_dir, self.cargo_lock)
 
         try:
-            with open(lockfile, "r", encoding="utf-8") as f:
+            with open(lockfile, "rb") as f:
                 try:
                     lock = tomllib.load(f)
                 except tomllib.TOMLDecodeError as e:

Reply via email to