Update __init__.py

This commit is contained in:
Max Zwiessele 2015-11-04 19:10:57 +00:00
parent 6b6938bd11
commit d1f4af7ec2

View file

@ -46,9 +46,10 @@ def load(file_or_path):
import cPickle as pickle
if isinstance(file_or_path, basestring):
with open(file_or_path, 'rb') as f:
m = pickle.load(f)
u = pickle._Unpickler(f)
u.encoding = 'latin1'
m = u.load()
else:
m = pickle.load(file_or_path)
except:
import pickle
if isinstance(file_or_path, str):