From 12dd4121e537044c227242a2893f25a418f13b44 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Tue, 10 Mar 2020 20:49:46 +0300 Subject: [PATCH] More fixes for UTF-8 characters in manifests files --- src/modules/client/transport/transport.py | 4 ++-- src/modules/manifest.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/client/transport/transport.py b/src/modules/client/transport/transport.py index 08890a5e5..f8246e10b 100644 --- a/src/modules/client/transport/transport.py +++ b/src/modules/client/transport/transport.py @@ -1686,7 +1686,7 @@ def _prefetch_manifests_list(self, mxfr, mlist, excludes=misc.EmptyI): continue try: - mf = open(dl_path) + mf = open(dl_path, "r", encoding="UTF-8") mcontent = mf.read() mf.close() manifest.FactoredManifest(fmri, @@ -1776,7 +1776,7 @@ def _verify_manifest(self, fmri, mfstpath=None, content=None, pub=None): return False if mfstpath: - mf = open(mfstpath) + mf = open(mfstpath, "r", encoding="UTF-8") mcontent = mf.read() mf.close() elif content is not None: diff --git a/src/modules/manifest.py b/src/modules/manifest.py index 979cc95dd..d6f1fabbe 100644 --- a/src/modules/manifest.py +++ b/src/modules/manifest.py @@ -1364,7 +1364,7 @@ def store(self, mfst_path): e.filename) raise - mfile = os.fdopen(fd, "w") + mfile = os.fdopen(fd, "w", encoding="UTF-8") # # We specifically avoid sorting manifests before writing