              self.execute(*args, **options.__dict__)
          except Exception as e:
              # self.stderr is not guaranteed to be set here
              stderr = getattr(self, 'stderr', OutputWrapper(sys.stderr, self.style.ERROR))
              stderr.write('%s: %s' % (e.__class__.__name__, e))
              sys.exit(1)
 
</s> remove             if options.traceback or not isinstance(e, CommandError):
                stderr.write(traceback.format_exc())
            else:
                stderr.write('%s: %s' % (e.__class__.__name__, e))
 </s> add             stderr.write('%s: %s' % (e.__class__.__name__, e)) </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             help='Print traceback on exception'),
 </s> add             help='Raise on exception'),
            if options.traceback or not isinstance(e, CommandError):
                raise

              self.execute(*args, **options.__dict__)
          except Exception as e:
            if options.traceback or not isinstance(e, CommandError):
                raise

              # self.stderr is not guaranteed to be set here
              stderr = getattr(self, 'stderr', OutputWrapper(sys.stderr, self.style.ERROR))
              stderr.write('%s: %s' % (e.__class__.__name__, e))
              sys.exit(1)
keep add keep keep keep keep
 Fixed #20445 -- Raised original exception after command error 
django/core/management/base.py