From: Simon Ruderich Date: Tue, 3 Sep 2013 01:12:51 +0000 (+0200) Subject: bin/notify.py: Check for invalid arguments. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=426e3bf6bb111ed5bf1c07dbababef3c66e672e5;p=config%2Fdotfiles.git bin/notify.py: Check for invalid arguments. --- 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'