summaryrefslogtreecommitdiff
path: root/examples/help_grep.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-05-27 16:00:29 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-05-27 16:04:30 +0200
commitb20db3b8a79c3e4e3421b1882fa80964726bdb4b (patch)
treea38189c431fa16c5fa7069518fe3021d261590b5 /examples/help_grep.py
parent7427079f008155f0901a5d53f9f1d4175381a585 (diff)
Simplify error exits
Had missed sys.exit(msg).
Diffstat (limited to 'examples/help_grep.py')
-rw-r--r--examples/help_grep.py3
1 files changed, 1 insertions, 2 deletions
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=<regex>")
- sys.exit(1)
+ sys.exit("Pass the regex with SCRIPT_ARG=<regex>")
search = re.compile(sys.argv[2], re.IGNORECASE).search