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/image.py | |
| parent | d67cd885ea88c3d11bb2d671c231aa9364f6ba14 (diff) | |
general: Use sys.exit everywhere.
Diffstat (limited to 'pywal/image.py')
| -rw-r--r-- | pywal/image.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pywal/image.py b/pywal/image.py index 0e6774b..787bb80 100644 --- a/pywal/image.py +++ b/pywal/image.py @@ -4,6 +4,7 @@ Get the image file. import os import pathlib import random +import sys from .settings import CACHE_DIR from . import util @@ -21,7 +22,7 @@ def get_random_image(img_dir): if not images: print("image: No new images found (nothing to do), exiting...") - quit(1) + sys.exit(1) return str(img_dir / random.choice(images).name) @@ -38,7 +39,7 @@ def get(img, cache_dir=CACHE_DIR): else: print("error: No valid image file found.") - exit(1) + sys.exit(1) # Cache the image file path. util.save_file(wal_img, cache_dir / "wal") |
