From 75932768e264f755da9255c2df85bbb9ecb8e588 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Thu, 3 Jul 2014 22:11:17 +0100 Subject: [PATCH] Adds a warning message if _songbook_dir is not set --- patacrep/content/include.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/patacrep/content/include.py b/patacrep/content/include.py index 777aa3bd..a7c14735 100644 --- a/patacrep/content/include.py +++ b/patacrep/content/include.py @@ -26,6 +26,11 @@ def parse(keyword, config, argument, contentlist): - contentlist: a list of file paths to be included. """ new_contentlist = [] + + if not os.path.isdir(config.get("_songbook_dir", "")): + LOGGER.warning("No songbook directory in configuration. 'include' " + "keyword may fail.") + for path in contentlist: filepath = os.path.join(config["_songbook_dir"], path) try: