From 426e3bf6bb111ed5bf1c07dbababef3c66e672e5 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 3 Sep 2013 03:12:51 +0200 Subject: [PATCH] bin/notify.py: Check for invalid arguments. --- bin/notify.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/notify.py b/bin/notify.py index 42fe661..3caa7d2 100755 --- a/bin/notify.py +++ b/bin/notify.py @@ -35,6 +35,10 @@ def mouse_press_callback(widget, event): if __name__ == '__main__': + if len(sys.argv) != 2: + sys.stderr.write("Usage: %s \n" % (sys.argv[0])) + sys.exit(1) + # Display configuration. BOLD = True FG_COLOR = 'blue' -- 2.45.2