From 33638ecb92357e1e256e3c14099298a11883a8b1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 19 Jun 2017 19:30:50 +1000 Subject: Error: Exit if no arguments are given to 'wal' --- wal.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'wal.py') diff --git a/wal.py b/wal.py index 01fa729..0728d2a 100755 --- a/wal.py +++ b/wal.py @@ -373,6 +373,12 @@ def main(): # Get the args. args = get_args() + # If no args were passed. + if not len(sys.argv) > 1: + print("error: wal needs to be given arguments to run.") + print(" Refer to 'wal -h' for more info.") + exit(1) + # -q if args.q: sys.stdout = open('/dev/null', 'w') -- cgit v1.2.3