In Python 3.2, the argument parser raises an error if no subcommand is
listed on the command line. This does not seem to be the case with
Python 3.3.0, and the changed behavior seems to have been a side
effect of this:
http://hg.python.org/cpython/rev/
cab204a79e09
changeset: 70741:
cab204a79e09
user: R David Murray <rdmurray@bitdance.com>
date: Thu Jun 09 12:34:07 2011 -0400
summary: #10424: argument names are now included in the missing argument mes
Anyhow, it's easy enough to catch the new behaviour in rss2email and
print the appropriate error.
Reported-by: Dmitry Bogatov <KAction@gnu.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
if args.verbose:
_LOG.setLevel(max(_logging.DEBUG, _logging.ERROR - 10 * args.verbose))
+ if not getattr(args, 'func', None):
+ parser.error('too few arguments')
+
try:
if not args.config:
args.config = None