[enh] make code more lisibile
This commit is contained in:
parent
7d57e8c4e5
commit
45352088f4
@ -290,7 +290,7 @@ def process_directory(gallery_name, settings, parent_templates, parent_gallery_p
|
|||||||
|
|
||||||
gallery_cover = {}
|
gallery_cover = {}
|
||||||
|
|
||||||
sub_galleries = filter(lambda x: x.joinpath("settings.yaml").exists(), Path(".").joinpath(gallery_path).listdir())
|
sub_galleries = [x.joinpath("settings.yaml") for x in Path(".").joinpath(gallery_path).listdir() if x.joinpath("settings.yaml").exists()]
|
||||||
|
|
||||||
Path("build").joinpath(gallery_path).makedirs_p()
|
Path("build").joinpath(gallery_path).makedirs_p()
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ def main():
|
|||||||
|
|
||||||
front_page_galleries_cover = []
|
front_page_galleries_cover = []
|
||||||
|
|
||||||
galleries_dirs = filter(lambda x: x.joinpath("settings.yaml").exists(), Path(".").listdir())
|
galleries_dirs = [x.joinpath("settings.yaml") for x in Path(".").listdir() if x.joinpath("settings.yaml").exists()]
|
||||||
|
|
||||||
error(galleries_dirs, "I can't find at least one directory with a settings.yaml in the current working "
|
error(galleries_dirs, "I can't find at least one directory with a settings.yaml in the current working "
|
||||||
"directory (NOT the settings.yaml in your current directory, but one INSIDE A "
|
"directory (NOT the settings.yaml in your current directory, but one INSIDE A "
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user