Author paul.j3
Recipients DasIch, G2P, Julian, bethard, bewest, bkabrda, chris.jerdonek, csernazs, dsully, elsdoerfer, eric.araujo, labrat, nvie, paul.j3, r.david.murray, seblu, zzzeek
Date 2013-04-13.06:24:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This patch addresses both issues raised here:
- throw an error when the subparser argument is missing
- allow the subparser argument to be optional

_SubParsersAction -
   add 'required=True' keyword.

   name(self) method - creates a name of the form {cmd1,cmd2} for error messages.

_get_action_name() - try if it can't get a name from option_strings, dest or metavar.  Still can return None.

2 error cases do a join on a list of action_names.  If a name is None, this will choke.  Add a ['%s'%x for x in list] guard. 
add cases to the subparser block to test the 'required' keyword, and to test the error message changes.

add a summary of the add_subparsers() arguments.
Date User Action Args
2013-04-13 06:24:33paul.j3setrecipients: + paul.j3, csernazs, bethard, eric.araujo, r.david.murray, zzzeek, labrat, chris.jerdonek, nvie, DasIch, elsdoerfer, G2P, Julian, dsully, seblu, bewest, bkabrda
2013-04-13 06:24:33paul.j3setmessageid: <>
2013-04-13 06:24:33paul.j3linkissue9253 messages
2013-04-13 06:24:32paul.j3create