From c467b11e15a67c807c61b83babb7fda7a493f8ab Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 4 Jun 2014 18:41:38 +0200 Subject: [PATCH] Gestion des datadirs incorrects --- songbook_core/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/songbook_core/build.py b/songbook_core/build.py index 1c910d81..c4ca638f 100755 --- a/songbook_core/build.py +++ b/songbook_core/build.py @@ -137,7 +137,10 @@ class Songbook(object): abs_datadir = [] for path in self.config['datadir']: - abs_datadir.append(os.path.abspath(path)) + if os.path.exists(path) and os.path.isdir(path): + abs_datadir.append(os.path.abspath(path)) + else: + LOGGER.warning("Ignoring non-existent datadir '{}'.".format(path)) abs_datadir.append(__DATADIR__)