diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-08 11:58:43 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-08 11:58:43 +1000 |
| commit | e839fab860a6ce415754af626c4afe00d8e9741a (patch) | |
| tree | 68e2e5ef0cebc6d0b6b9958b1bbe919d4a6b591e /pywal | |
| parent | bf88cd7881fce77298ec6df526a1784827acfbe4 (diff) | |
magic: Fixed infinite loop when wal is given a really simple image.
Diffstat (limited to 'pywal')
| -rw-r--r-- | pywal/magic.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pywal/magic.py b/pywal/magic.py index 406a513..d4dd213 100644 --- a/pywal/magic.py +++ b/pywal/magic.py @@ -41,6 +41,11 @@ def gen_colors(img): "color palette, trying a larger palette size", COLOR_COUNT + index) + if index > 20: + print("colors: Imagemagick couldn't generate a suitable scheme", + "for the image. Exiting...") + quit(1) + # Remove the first element, which isn't a color. del raw_colors[0] |
