          old_stderr = sys.stderr
          sys.stderr = err = StringIO()
          try:
              command.execute = lambda args: args  # This will trigger TypeError
              with self.assertRaises(SystemExit):
                  command.run_from_argv(['', ''])
              err_message = err.getvalue()
              # Exceptions other than CommandError automatically output the traceback
              self.assertIn("Traceback", err_message)
              self.assertIn("TypeError", err_message)
 
</s> remove             err_message = err.getvalue()
            # Exceptions other than CommandError automatically output the traceback
            self.assertIn("Traceback", err_message)
            self.assertIn("TypeError", err_message)
 </s> add  </s> remove             err_message = err.getvalue()
            self.assertIn("Traceback (most recent call last)", err_message)
            self.assertIn("CommandError", err_message)
 </s> add  </s> remove             help='Print traceback on exception'),
 </s> add             help='Raise on exception'),
            # If the Exception is not CommandError it should always
            # raise the original exception.
            with self.assertRaises(TypeError):
          old_stderr = sys.stderr
          sys.stderr = err = StringIO()
          try:
              command.execute = lambda args: args  # This will trigger TypeError
            # If the Exception is not CommandError it should always
            # raise the original exception.
            with self.assertRaises(TypeError):
                  command.run_from_argv(['', ''])
              err_message = err.getvalue()
              # Exceptions other than CommandError automatically output the traceback
              self.assertIn("Traceback", err_message)
              self.assertIn("TypeError", err_message)
keep keep keep keep replace keep keep keep keep keep
 Fixed #20445 -- Raised original exception after command error 
tests/admin_scripts/tests.py