From 95a64461b785e344555e665a25163ae878d549f8 Mon Sep 17 00:00:00 2001 From: OnRaptor <58369670+OnRaptor@users.noreply.github.com> Date: Wed, 19 Feb 2020 04:16:11 +0800 Subject: [PATCH] Update linedraw.py --- linedraw.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linedraw.py b/linedraw.py index 65f270d..467c27d 100644 --- a/linedraw.py +++ b/linedraw.py @@ -175,7 +175,9 @@ def sketch(path): try: IM = Image.open(p) break - except: + except FileNotFoundError: + print("The Input File wasn't found. Check Path") + exit(0) pass w,h = IM.size @@ -258,4 +260,4 @@ if __name__ == "__main__": contour_simplify = args.contour_simplify show_bitmap = args.show_bitmap no_cv = args.no_cv - sketch(args.input_path) \ No newline at end of file + sketch(args.input_path)