[fix] at installation the cache dir might not be present

This commit is contained in:
Laurent Peuch 2016-11-29 20:36:13 +01:00
parent b5fda77b17
commit 54a50a40b9

View file

@ -523,6 +523,8 @@ class ActionsMap(object):
with open(am_file, 'r') as f:
actionsmaps[n] = yaml.load(f)
# at installation, cachedir might not exists
if os.path.exists('%s/actionsmap/' % pkg.cachedir):
# clean old cached files
for i in os.listdir('%s/actionsmap/' % pkg.cachedir):
if i.endswith(".pkl"):