'Selects a mailbox on the IMAP server
:returns: \'OK\' on success, nothing if the folder was already
selected or raises an :exc:`OfflineImapError`.'

def select(self, mailbox='INBOX', readonly=False, force=False):

    if ((self.__getselectedfolder() == mailbox) and (self.is_readonly == readonly) and (not force)):
        return
    try:
        result = super(UsefulIMAPMixIn, self).select(mailbox, readonly)
    except self.readonly as e:
        raise
    except self.abort as e:
        errstr = ("Server    '%s'    closed    connection,    error    on    SELECT    '%s'.    Server    said:    %s" % (self.host, mailbox, e.args[0]))
        severity = OfflineImapError.ERROR.FOLDER_RETRY
        six.reraise(OfflineImapError, OfflineImapError(errstr, severity), exc_info()[2])
    if (result[0] != 'OK'):
        errstr = ("Error    SELECTing    mailbox    '%s',    server    reply:\n%s" % (mailbox, result))
        severity = OfflineImapError.ERROR.FOLDER
        raise OfflineImapError(errstr, severity)
    return result
