From 1d328aeffe653fbde3e4cc592a734b4018248f0e Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 3 Nov 2019 22:21:37 -0600 Subject: [PATCH] quit early before running intensive file analysis - on literally nothing --- phototag/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phototag/app.py b/phototag/app.py index 46894bf..4c34ce3 100644 --- a/phototag/app.py +++ b/phototag/app.py @@ -27,6 +27,9 @@ def run(): files = os.listdir(INPUT_PATH) select = [file for file in files if os.path.splitext(file)[1][1:].lower() in (RAW_EXTS + LOSSY_EXTS)] log.info(f'Found {len(select)} valid files') + if len(select) <= 0: + log.fatal('No vald files found, exiting early') + return # Create the 'temp' directory if not os.path.exists(TEMP_PATH):