Merge pull request #128 from YunoHost/fix_installation

[fix] at installation the cache dir might not be present
This commit is contained in:
Laurent Peuch 2016-11-30 18:34:44 +01:00 committed by GitHub
commit 8404b03c87

View file

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