Error: Exit if no arguments are given to 'wal'

This commit is contained in:
Dylan Araps 2017-06-19 19:30:50 +10:00
parent 57fed5b29c
commit 33638ecb92

6
wal.py
View File

@ -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')