From b60d9d0d9758982d48272fa5c59fcb4b7e54d8aa Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 28 Jul 2017 17:49:40 +1000 Subject: general: Use sys.exit everywhere. --- pywal/image.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pywal/image.py') 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") -- cgit v1.2.3