From b20db3b8a79c3e4e3421b1882fa80964726bdb4b Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 27 May 2018 16:00:29 +0200 Subject: Simplify error exits Had missed sys.exit(msg). --- examples/help_grep.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/help_grep.py') diff --git a/examples/help_grep.py b/examples/help_grep.py index a476d9c..20a4911 100644 --- a/examples/help_grep.py +++ b/examples/help_grep.py @@ -38,8 +38,7 @@ import re import sys if len(sys.argv) < 3: - print("Pass the regex with SCRIPT_ARG=") - sys.exit(1) + sys.exit("Pass the regex with SCRIPT_ARG=") search = re.compile(sys.argv[2], re.IGNORECASE).search -- cgit v1.2.3