CommandParser not requires cmd argument in django2.1
@@ -86,7 +86,11 @@ def entry():
if len(sys.argv) > 1:
subcommand = sys.argv[1]
- parser = CommandParser(None, usage="%(prog)s subcommand [options] [args]", add_help=False)
+ if sys.version_info[0] < 3:
+ args = [None]
+ else:
+ args = []
+ parser = CommandParser(*args, usage="%(prog)s subcommand [options] [args]", add_help=False)
parser.parse_known_args(sys.argv[2:])
if len(sys.argv) > 1:
