[mod] pep8

This commit is contained in:
Laurent Peuch 2016-11-16 03:29:19 +01:00
parent fbc7a63386
commit 0bb174905e

View file

@ -370,9 +370,12 @@ class ActionsMap(object):
actionsmap_yml = '%s/actionsmap/%s.yml' % (pkg.datadir, n) actionsmap_yml = '%s/actionsmap/%s.yml' % (pkg.datadir, n)
actionsmap_yml_stat = os.stat(actionsmap_yml) actionsmap_yml_stat = os.stat(actionsmap_yml)
actionsmap_pkl = '%s/actionsmap/%s-%d-%d.pkl' % (pkg.cachedir, n, actionsmap_pkl = '%s/actionsmap/%s-%d-%d.pkl' % (
pkg.cachedir,
n,
actionsmap_yml_stat.st_size, actionsmap_yml_stat.st_size,
actionsmap_yml_stat.st_mtime) actionsmap_yml_stat.st_mtime
)
if use_cache and os.path.exists(actionsmap_pkl): if use_cache and os.path.exists(actionsmap_pkl):
try: try:
@ -527,7 +530,9 @@ class ActionsMap(object):
# Cache actions map into pickle file # Cache actions map into pickle file
am_file_stat = os.stat(am_file) am_file_stat = os.stat(am_file)
pkl = '%s-%d-%d.pkl' % (n, am_file_stat.st_size, am_file_stat.st_mtime) pkl = '%s-%d-%d.pkl' % (n, am_file_stat.st_size, am_file_stat.st_mtime)
with pkg.open_cachefile(pkl, 'w', subdir='actionsmap') as f: with pkg.open_cachefile(pkl, 'w', subdir='actionsmap') as f:
pickle.dump(actionsmaps[n], f) pickle.dump(actionsmaps[n], f)