# HG changeset patch # User palgarvio # Date 1229994779 0 # Node ID e24e6a4d351285088136678ecc3182531f5503fc # Parent fb926f48efbaf40789acf826ed80dc27c9505769 Use a more explicit error message if no option or argument(command) is passed to `pybabel`. Fixes #81. diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -648,7 +648,8 @@ return 0 if not args: - self.parser.error('incorrect number of arguments') + self.parser.error('no valid command or option passed. ' + 'Try the -h/--help option for more information.') cmdname = args[0] if cmdname not in self.commands: diff --git a/babel/messages/tests/frontend.py b/babel/messages/tests/frontend.py --- a/babel/messages/tests/frontend.py +++ b/babel/messages/tests/frontend.py @@ -529,7 +529,7 @@ self.assertEqual("""\ usage: pybabel command [options] [args] -pybabel: error: incorrect number of arguments +pybabel: error: no valid command or option passed. try the -h/--help option for more information. """, sys.stderr.getvalue().lower()) def test_help(self):