mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-21 01:57:55 +02:00
Merge 1ff36760d36a83407794f22cc419fac99182f6d5 into 236aa48e741ff8d65c4c3826db2813bf2ee6f352
This commit is contained in:
commit
1296b9a764
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user