Exit configuration mode.
493518
def exit_config_mode(self, exit_config="exit", pattern=r">"):
        """"""
        return super(PaloAltoPanosBase, self).exit_config_mode(
            exit_config=exit_config, pattern=pattern
        )
818857
def clear_mode(self, mode, value=None):
        
        try:
            if mode in self.user_modes:
                del self.mode_users[mode][value]
            else:
                del self.modes[mode]
        except KeyError:
            pass
1031828
def close(self):
        """"""
        try:
            self._socket.sendall('quit\r\n')
        except socket.error:
            pass
        try:
            self._socket.close()
        except socket.error:
            pass
404308
def switch_off(self):
        """"""
        success = self.set_status(CONST.STATUS_CLOSED_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_CLOSED

        return success
900329
def leave_safe_mode(self):
        """"""

        self.code_array.safe_mode = False

        # Clear result cache
        self.code_array.result_cache.clear()

        # Execute macros
        self.main_window.actions.execute_macros()

        post_command_event(self.main_window, self.SafeModeExitMsg)
53318
def cleanup(config_dir):
    """"""
    stdout_path = os.path.join(config_dir, 'pueue.stdout')
    stderr_path = os.path.join(config_dir, 'pueue.stderr')
    if os._exists(stdout_path):
        os.remove(stdout_path)
    if os._exists(stderr_path):
        os.remove(stderr_path)

    socketPath = os.path.join(config_dir, 'pueue.sock')
    if os.path.exists(socketPath):
        os.remove(socketPath)
155243
def postloop(self) -> None:
        """"""
        code = self.exit_code if self.exit_code is not None else 0
        self.poutput('{!r} exiting with code: {}'.format(sys.argv[0], code))
463288
def on_terminate(func):
    """"""
    def exit_function(*args):
        func()
        exit(0)
    signal.signal(signal.SIGTERM, exit_function)
1342206
def exit(self):
        """"""
        if self.client is not None:
            self.client.close()
        if self.context is not None:
            self.context.destroy()
913076
def cli(ctx, cmd):
    """"""

    exit_code = util.call(cmd)
    ctx.exit(exit_code)
795383
def exit_config_mode(self, exit_config="return", pattern=r">"):
        """"""
        return super(HPComwareBase, self).exit_config_mode(
            exit_config=exit_config, pattern=pattern
        )
745598
def terminate(self):
        """"""
        self.toggle_scan(False)
        self.keep_going = False
        self.join()
1147418
def exit_cleanly(errnum=None):
    
    default = "An Unknown Error has Occurred!"
    cases = {errno.EINVAL: "Improper or invalid input value",
             errno.ESPIPE: "Could not complete action due to a broken" +
             " dependency",
             errno.ENOSYS: "Could not complete action due to unexpected setup",
             errno.EIO: "Could not access an expected file",
             errno.EPERM: "Could not access an item due to permissions issues",
             -1: default}
    help_stmt = """
%s [--opt [option]]
    With opts:
        working_directory - ONLY use this if you're overwriting `pwd`!
    """ % (sys.argv[0])
    if not errnum:
        errnum = 0
    elif not isinstance(errnum, int) and hasattr(errno, errnum):
        errnum = getattr(errno, errnum)
    try:
        errnum = int(errnum)
    except TypeError:
        errnum = -1
    if errnum == 0:
        help_stmt = ''
        stmt = "Successful in configuration!"
    elif errnum in cases:
        stmt = cases[errnum]
    else:
        stmt = default
    print("%s\n\n%s" % (stmt, help_stmt))
672827
def exit_config_mode(self, exit_config="exit all", pattern="#"):
        
        return super(AlcatelSrosSSH, self).exit_config_mode(
            exit_config=exit_config, pattern=pattern
        )
547674
protected void unsetConfigAdmin(ConfigurationAdmin configAdmin) {
        SibTr.entry(tc, CLASS_NAME + "unsetConfigAdmin", configAdmin);

        SibTr.exit(tc, CLASS_NAME + "unsetConfigAdmin");
    }
652858
def exit(self, status=0, message=None):
        '''
        
        '''
        self.exited = True
        if message is not None:
            self.mesgs.extend(message.split('\n'))
        raise s_exc.BadSyntax(mesg=message, prog=self.prog, status=status)
111209
def pop_configuration(self):
        
        if len(self.__configurations) == 1:
            raise IndexError('Can not pop the last configuration from the '
                             'stack of configurations.')
        self.__configurations.pop()
        self.__mapped_attr_cache.clear()