From a816cb1497a323e2d3260f30fe9a822876fe56bf Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 8 Dec 2015 07:18:41 +0100 Subject: [PATCH] [mod] ensure that the settings.yaml has a title key --- prosopopoee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prosopopoee b/prosopopoee index 9dbac90..108a8db 100755 --- a/prosopopoee +++ b/prosopopoee @@ -12,6 +12,8 @@ def main(): settings = yaml.safe_load("settings.yaml") + assert settings.get("title"), "You should specify a title in your main settings.yaml" + dirs = filter(lambda x: x not in (".", "..") and os.path.isdir(x) and os.path.exists(os.path.join(os.getcwd(), x, "settings.yaml")), os.listdir(os.getcwd())) if not dirs: