summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-06-19 19:30:50 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-06-19 19:30:50 +1000
commit33638ecb92357e1e256e3c14099298a11883a8b1 (patch)
tree8f07796da078bf5a7f9a6ea404b33573cc4da9bd
parent57fed5b29cbd7b7a64c114a3751f47793ce8396c (diff)
Error: Exit if no arguments are given to 'wal'
-rwxr-xr-xwal.py6
1 files changed, 6 insertions, 0 deletions
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')