                  command.run_from_argv(['', ''])
  
              command.execute = raise_command_error
              err.truncate(0)
              with self.assertRaises(SystemExit):
                  command.run_from_argv(['', ''])
              err_message = err.getvalue()
 
</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             with self.assertRaises(SystemExit):
 </s> add             # If the Exception is not CommandError it should always
            # raise the original exception.
            with self.assertRaises(TypeError): </s> remove             with self.assertRaises(SystemExit):
 </s> add             with self.assertRaises(CommandError): </s> remove             err_message = err.getvalue()
            self.assertIn("Traceback (most recent call last)", err_message)
            self.assertIn("CommandError", err_message)
 </s> add 
            # If the Exception is CommandError and --traceback is not present
            # this command should raise a SystemExit and don't print any
            # traceback to the stderr.
                  command.run_from_argv(['', ''])
  
            # If the Exception is CommandError and --traceback is not present
            # this command should raise a SystemExit and don't print any
            # traceback to the stderr.
              command.execute = raise_command_error
              err.truncate(0)
              with self.assertRaises(SystemExit):
                  command.run_from_argv(['', ''])
              err_message = err.getvalue()
keep add keep keep keep keep keep
 Fixed #20445 -- Raised original exception after command error 
tests/admin_scripts/tests.py