telmich added the comment:

Thanks a lot - let me know when I can help more.

After re-reading the documentation, I think the behaviour for subparsers is not 
specified: It is not specified, whether a subparser is required to be present 
or not.

Attached stripped down version of the cdist code to a bare minimum 
(subparse.py) which shows the problem more clear:

% python3 -V              
Python 3.2.3
% python3 ~/subparse.py   
usage: subparse.py [-h] [-V] {banner} ...
subparse.py: error: too few arguments


versus

[15:44] brief:~% python3 -V
Python 3.3.0
[15:46] brief:~% python3 subparse.py  
Traceback (most recent call last):
  File "subparse.py", line 31, in <module>
    commandline()
  File "subparse.py", line 25, in commandline
    args.func(args)
AttributeError: 'Namespace' object has no attribute 'func'

----------
Added file: http://bugs.python.org/file27694/subparse.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16308>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to