Mercurial > babel > old > babel-test
changeset 424:6f86eb8f54ce
Use a more explicit error message if no option or argument(command) is passed to `pybabel`. Fixes #81.
author | palgarvio |
---|---|
date | Tue, 23 Dec 2008 01:12:59 +0000 |
parents | 8f91314df0b9 |
children | 4c8a5e533722 |
files | babel/messages/frontend.py babel/messages/tests/frontend.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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):