iwla

iwla Commit Details

Date:2017-05-07 16:55:05 (4 years 2 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:3ce35b7b47482c4796af92f22ee540045eb9bf21
Parents: 906fd5be119d4413efd7ccc1782ea2541d8bb777
Message:Use cPickle instead of pickle

Changes:
Miwla.py (3 diffs)

File differences

iwla.py
2424
2525
2626
27
27
2828
2929
3030
......
248248
249249
250250
251
251
252252
253253
254254
......
258258
259259
260260
261
261262
262
263
263
264
264265
265266
266267
import sys
import re
import time
import pickle
import cPickle
import gzip
import importlib
import argparse
os.makedirs(base)
with open(filename + '.tmp', 'wb+') as f, self._openDB(filename, 'w') as fzip:
pickle.dump(obj, f)
cPickle.dump(obj, f)
os.fsync(f)
f.seek(0)
fzip.write(f.read())
if not os.path.exists(filename):
return None
res = None
with self._openDB(filename) as f:
return pickle.load(f)
return None
res = cPickle.load(f)
return res
def _callPlugins(self, target_root, *args):
self.logger.info('==> Call plugins (%s)' % (target_root))

Archive Download the corresponding diff file

Branches

Tags