try:
f = open(self._cache_filename, mode='rb')
mypickle = pickle.Unpickler(f)
+ try:
+ mypickle.find_global = None
+ except AttributeError:
+ # TODO: If py3k, override Unpickler.find_class().
+ pass
self._cache_data = mypickle.load()
f.close()
del f
try:
f = open(filename, 'rb')
mypickle = pickle.Unpickler(f)
+ try:
+ mypickle.find_global = None
+ except AttributeError:
+ # TODO: If py3k, override Unpickler.find_class().
+ pass
d = mypickle.load()
f.close()
del f
try:
f = open(self._aux_cache_filename, mode='rb', **open_kwargs)
mypickle = pickle.Unpickler(f)
+ try:
+ mypickle.find_global = None
+ except AttributeError:
+ # TODO: If py3k, override Unpickler.find_class().
+ pass
aux_cache = mypickle.load()
f.close()
del f
out = sys.stdout
try:
metadatafile = open(metadatafilename, 'rb')
- metadata = pickle.load(metadatafile)
+ mypickle = pickle.Unpickler(metadatafile)
+ try:
+ mypickle.find_global = None
+ except AttributeError:
+ # TODO: If py3k, override Unpickler.find_class().
+ pass
+ metadata = mypickle.load()
out.write("Loaded metadata pickle.\n")
out.flush()
metadatafile.close()