publisher: restore config.json from zip file as text (#36515)
This commit is contained in:
parent
7a29de02bb
commit
a87a181371
|
@ -22,6 +22,7 @@ import traceback
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
from django.utils.encoding import force_text
|
||||||
from django.utils.six.moves import cPickle
|
from django.utils.six.moves import cPickle
|
||||||
|
|
||||||
from .Defaults import *
|
from .Defaults import *
|
||||||
|
@ -201,7 +202,7 @@ class WcsPublisher(StubWcsPublisher):
|
||||||
if f == 'config.pck':
|
if f == 'config.pck':
|
||||||
d = cPickle.loads(data)
|
d = cPickle.loads(data)
|
||||||
else:
|
else:
|
||||||
d = json.loads(data, object_hook=_decode_dict)
|
d = json.loads(force_text(data), object_hook=_decode_dict)
|
||||||
if 'sp' in self.cfg:
|
if 'sp' in self.cfg:
|
||||||
current_sp = self.cfg['sp']
|
current_sp = self.cfg['sp']
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue