diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-28 17:49:40 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-28 17:49:40 +1000 |
| commit | b60d9d0d9758982d48272fa5c59fcb4b7e54d8aa (patch) | |
| tree | d2480caee0754fef7ca8070e631a34a47ed9d43d /pywal/colors.py | |
| parent | d67cd885ea88c3d11bb2d671c231aa9364f6ba14 (diff) | |
general: Use sys.exit everywhere.
Diffstat (limited to 'pywal/colors.py')
| -rw-r--r-- | pywal/colors.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pywal/colors.py b/pywal/colors.py index 7e2dbb0..1668a13 100644 --- a/pywal/colors.py +++ b/pywal/colors.py @@ -4,6 +4,7 @@ Generate a colorscheme using imagemagick. import re import shutil import subprocess +import sys from .settings import CACHE_DIR, COLOR_COUNT from . import util @@ -25,7 +26,7 @@ def gen_colors(img, color_count): if not shutil.which("convert"): print("error: imagemagick not found, exiting...\n" "error: wal requires imagemagick to function.") - exit(1) + sys.exit(1) raw_colors = imagemagick(color_count, img) @@ -41,7 +42,7 @@ def gen_colors(img, color_count): if index > 20: print("colors: Imagemagick couldn't generate a suitable scheme", "for the image. Exiting...") - quit(1) + sys.exit(1) # Remove the first element because it isn't a color code. del raw_colors[0] |
