misc: load config.pck as utf-8 (#37976)
This commit is contained in:
parent
73088ea36e
commit
0463cadea1
|
@ -704,7 +704,10 @@ class QommonPublisher(Publisher, object):
|
|||
def reload_cfg(self):
|
||||
filename = os.path.join(self.app_dir, 'config.pck')
|
||||
try:
|
||||
self.cfg = cPickle.load(open(filename, 'rb'))
|
||||
if six.PY3:
|
||||
self.cfg = cPickle.load(open(filename, 'rb'), encoding='utf-8')
|
||||
else:
|
||||
self.cfg = cPickle.load(open(filename, 'rb'))
|
||||
except:
|
||||
self.cfg = {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue