Exemplo n.º 1
0
 def create_parser(self, prog_name, subcommand):
     # Overwrite parser creation with a LaxOptionParser that will
     # ignore arguments it doesn't know, allowing us to pass those
     # along to the webassets command.
     # Hooking into run_from_argv() would be another thing to try
     # if this turns out to be problematic.
     parser = BaseCommand.create_parser(self, prog_name, subcommand)
     parser.__class__ = LaxOptionParser
     return parser
Exemplo n.º 2
0
 def create_parser(self, prog_name, subcommand):
     # Overwrite parser creation with a LaxOptionParser that will
     # ignore arguments it doesn't know, allowing us to pass those
     # along to the webassets command.
     # Hooking into run_from_argv() would be another thing to try
     # if this turns out to be problematic.
     parser = BaseCommand.create_parser(self, prog_name, subcommand)
     parser.__class__ = LaxOptionParser
     return parser