From f08e2aa38f879d85fad879f778aba090b2368e4b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 2 Apr 2018 16:58:42 +1000 Subject: export: Cleanup --- pywal/export.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'pywal') diff --git a/pywal/export.py b/pywal/export.py index ed7a846..993e528 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -57,13 +57,9 @@ def every(colors, output_dir=CACHE_DIR): util.create_dir(template_dir_user) join = os.path.join # Minor optimization. - - for file in os.scandir(template_dir): - if file.name != '.DS_Store': - template(colors, file.path, join(output_dir, file.name)) - - for file in os.scandir(template_dir_user): - if file.name != '.DS_Store': + for file in [*os.scandir(template_dir), + *os.scandir(template_dir_user)]: + if file.name != ".DS_Store": template(colors, file.path, join(output_dir, file.name)) logging.info("Exported all files.") -- cgit v1.2.3