Mercurial > babel > old > babel-test
changeset 474:ee0b9aa340df stable-0.9.x
Merged revisions 466 via svnmerge from
http://svn.edgewall.org/repos/babel/trunk
........
r466 | palgarvio | 2008-12-23 02:12:59 +0100 (di, 23 dec 2008) | 2 lines
Use a more explicit error message if no option or argument(command) is passed to `pybabel`. Fixes #81.
........
author | jruigrok |
---|---|
date | Sun, 11 Apr 2010 08:29:00 +0000 |
parents | acee33f7567c |
children | 1dd3592c6159 |
files | ChangeLog babel/messages/frontend.py babel/messages/tests/frontend.py |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ * Sort output of list-locales. * Make the POT-Creation-Date of the catalog being updated equal to POT-Creation-Date of the template used to update (ticket #148). + * Use a more explicit error message if no option or argument (command) is + passed to pybabel (ticket #81). Version 0.9.5
--- 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):