#27799: If 'args' is used on a custom LabelCommand or AppCommand subclass, only 
the
last positional arg is supplied to the command
----------------------------------------------+------------------------
               Reporter:  Matthew Somerville  |          Owner:  nobody
                   Type:  Bug                 |         Status:  new
              Component:  Uncategorized       |        Version:  1.8
               Severity:  Normal              |       Keywords:
           Triage Stage:  Unreviewed          |      Has patch:  0
    Needs documentation:  0                   |    Needs tests:  0
Patch needs improvement:  0                   |  Easy pickings:  0
                  UI/UX:  0                   |
----------------------------------------------+------------------------
 argparse has undefined behaviour if add_argument is called twice with the
 same name – Django does this for LabelCommand and AppCommand when
 self.args is used, the first call to parser.add_argument('args') in
 BaseCommand, the second in LabelCommand/AppCommand.

 What appears to happen is you get only the last positional argument
 supplied to your command; if the '*' and the '+' had been the other way
 round, you would get nothing.

--
Ticket URL: <https://code.djangoproject.com/ticket/27799>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.c5a152556222ece964d09588c10944c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to