Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Fix error with iterative option in empty directory #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pywal/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down