diff options
| author | Lorenz Leitner <lorenz.leitner@student.tugraz.at> | 2019-03-14 20:20:33 +0100 |
|---|---|---|
| committer | Lorenz Leitner <lorenz.leitner@student.tugraz.at> | 2019-03-14 20:20:33 +0100 |
| commit | e10337c838d088e3a8075c3f2771574bbf001a5d (patch) | |
| tree | 1bd5b72f986ab0545d5cef247d470aaa1d12f44a /pywal/image.py | |
| parent | c823e3c9dbd0100ca09caf824e77d296685a1c1e (diff) | |
Print found directories
TODO: Move to different method, since this way lower depth images are
preferred
Diffstat (limited to 'pywal/image.py')
| -rw-r--r-- | pywal/image.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pywal/image.py b/pywal/image.py index 897f443..63ab209 100644 --- a/pywal/image.py +++ b/pywal/image.py @@ -31,7 +31,10 @@ def get_random_image(img_dir): images.remove(current_wall) elif not images: - logging.error("No images found in directory.") + logging.error("No images found in directory, picking random directory.") + logging.info("Found dirs: {}".format([dir_file.name for dir_file in + os.scandir(img_dir)])) + sys.exit(1) random.shuffle(images) @@ -59,7 +62,7 @@ def get_next_image(img_dir): return os.path.join(img_dir, image) -def get(img, cache_dir=CACHE_DIR, iterative=False): +def get(img, cache_dir=CACHE_DIR, iterative=False, recursive=False): """Validate image input.""" if os.path.isfile(img): wal_img = img |
