Fixed #19973 -- Replaced optparse by argparse in management commands

chop "class" as noted below (and search for other usage if you agree)