[enh] better handling of cover image path
This commit is contained in:
parent
7c6cdb2b4b
commit
747c02ab39
@ -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 ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user