This commit is contained in:
Martin Terneborg 2021-09-10 08:14:35 +05:30 committed by GitHub
commit 1296b9a764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,11 @@ def get_next_image(img_dir, recursive):
image = images[next_index]
except IndexError:
image = images[0]
if images:
image = images[0]
else:
logging.error("No images found in directory.")
sys.exit(1)
return os.path.join(img_dir if not recursive else "", image)