From 747c02ab39a309096cf2e0d9504988b0cd10a574 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 8 Dec 2015 08:22:08 +0100 Subject: [PATCH] [enh] better handling of cover image path --- prosopopoee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prosopopoee b/prosopopoee index 3eb1a2e..3e832f2 100755 --- a/prosopopoee +++ b/prosopopoee @@ -42,6 +42,10 @@ def main(): error(gallery_settings.get("title"), "You should specify a title in %s" % (os.path.join(gallery, "settings.yaml"))) error(gallery_settings.get("cover"), "You should specify a path to a cover picture in %s" % (os.path.join(gallery, "settings.yaml"))) + cover_image_path = os.path.join(os.getcwd(), gallery, gallery_settings["cover"]) + + error(not os.path.exists(cover_image_path), "File for %s cover image doesn't exists at %s" % (gallery, cover_image_path)) + gallery_title = gallery_settings["title"] gallery_sub_title = gallery_settings.get("sub_title", "") gallery_date = gallery_settings["date"] if "date" in gallery_settings else ""