From a87a181371b452d63d73ff7df8fa97074d58bf3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 19 Nov 2019 15:26:06 +0100 Subject: [PATCH] publisher: restore config.json from zip file as text (#36515) --- wcs/publisher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcs/publisher.py b/wcs/publisher.py index 70113b326..4030c4836 100644 --- a/wcs/publisher.py +++ b/wcs/publisher.py @@ -22,6 +22,7 @@ import traceback import zipfile from django.utils import six +from django.utils.encoding import force_text from django.utils.six.moves import cPickle from .Defaults import * @@ -201,7 +202,7 @@ class WcsPublisher(StubWcsPublisher): if f == 'config.pck': d = cPickle.loads(data) else: - d = json.loads(data, object_hook=_decode_dict) + d = json.loads(force_text(data), object_hook=_decode_dict) if 'sp' in self.cfg: current_sp = self.cfg['sp'] else: