code: def run(self, accept_unrecognized_args=False):
          
  
          self.__parse_args(accept_unrecognized_args)
          self.__parse_config()
          self.__process_username_password()
          self.__finish_initializing()
  
          exit_status = 0
  
          try:
              yield self
          except ExitedCleanly:
              pass
          except (Exception, KeyboardInterrupt) as e:
              # Run any method a library or caller might have registered.
              for base in type(e).mro():
                  if base in self.exceptions:
                      self.exceptions[base](e)
                      break
              else:
                  self.log.exception(e)
  
              exit_status = os.EX_SOFTWARE
          finally:
              logging.shutdown()
  
          sys.exit(exit_status)
docs: Called via the `with` statement to invoke the :func:`contextlib.contextmanager`.
  
            Control is then yielded back to the caller.
  
            All exceptions are caught & a stack trace emitted, except in the case of `shrew.cli.ExitedCleanly`.