From 213125199d1dcd489046a1ca2ddfda47f67dd4e0 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Mon, 14 Mar 2011 09:43:12 +0100 Subject: [PATCH] Print a message when no arguments given (#684463) --- src/sbin/lorax | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sbin/lorax b/src/sbin/lorax index 0e7ab700..3096fa5d 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -74,7 +74,11 @@ def main(args): # parse the arguments opts, args = parser.parse_args() - outputdir = args[0] + + try: + outputdir = args[0] + except IndexError: + parser.error("missing one or more required arguments") if opts.showver: print(version)