Beispiel #1
0
    def MYRIGHTS_response(self, code, args):
        response = scan_sexp(args)

        self.sstatus['myrights_response'] = {
            'mailbox': response[0],
            'rights': response[1]
        }
Beispiel #2
0
    def ACL_response(self, code, args):
        response = scan_sexp(args)

        it = iter(response[1:])
        acl = dict(zip(it, it))

        self.sstatus['acl_response'] = {'mailbox': response[0], 'acl': acl}
Beispiel #3
0
    def ACL_response(self, code, args):
        response = scan_sexp(args)

        it = iter(response[1:])
        acl = dict(zip(it, it))

        self.sstatus["acl_response"] = {"mailbox": response[0], "acl": acl}
Beispiel #4
0
    def ACL_response(self, code, args):
        response = scan_sexp(args)

        it = iter(response[1:])
        acl = dict(zip(it, it))

        self.sstatus['acl_response'] = { 'mailbox': response[0],
                                        'acl': acl }
Beispiel #5
0
    def LISTRIGHTS_response(self, code, args):

        response = scan_sexp( args )

        self.sstatus['listrights_response'] = {
            'mailbox': response[0],
            'identifier': response[1],
            'req_rights': response[2],
            'opt_rights': tuple(response[3]) }
Beispiel #6
0
    def LISTRIGHTS_response(self, code, args):

        response = scan_sexp(args)

        self.sstatus['listrights_response'] = {
            'mailbox': response[0],
            'identifier': response[1],
            'req_rights': response[2],
            'opt_rights': tuple(response[3])
        }
Beispiel #7
0
    def LISTRIGHTS_response(self, code, args):

        response = scan_sexp(args)

        self.sstatus["listrights_response"] = {
            "mailbox": response[0],
            "identifier": response[1],
            "req_rights": response[2],
            "opt_rights": tuple(response[3]),
        }
Beispiel #8
0
    def __init__(self, result):
        # Scan the message and make it a dict
        it = iter(scan_sexp(result)[0])
        result = dict(zip(it,it))

        dict.__init__(self, result )

        for data_item in self:
            method_name = data_item + '_data_item'
            meth = getattr(self, method_name, self.default_data_item )
            self[data_item] = meth( self[data_item] )
Beispiel #9
0
    def __init__(self, result):
        # Scan the message and make it a dict
        it = iter(scan_sexp(result)[0])
        result = dict(zip(it, it))

        dict.__init__(self, result)

        for data_item in self:
            method_name = data_item + '_data_item'
            meth = getattr(self, method_name, self.default_data_item)
            self[data_item] = meth(self[data_item])
Beispiel #10
0
    def LIST_response(self, code, args):
        resp = scan_sexp(args)

        try:
            attributes = resp[0]
            hierarchy_delimiter = resp[1]
            name = resp[2]
        except:
            raise self.Error("Don't know how to parse the LIST response: %s" % args)

        # If the hierarchy_delimiter is NIL no hierarchy exists
        if hierarchy_delimiter != "NIL":
            hierarchy_delimiter = unquote(hierarchy_delimiter)
        else:
            hierarchy_delimiter = None

        self.sstatus["list_response"].append(parselist.Mailbox(name, attributes, hierarchy_delimiter))
Beispiel #11
0
    def LIST_response(self, code, args):
        resp = scan_sexp(args)

        try:
            attributes = resp[0]
            hierarchy_delimiter = resp[1]
            name = resp[2]
        except:
            raise self.Error('Don\'t know how to parse the LIST response: %s' %\
                args )

        # If the hierarchy_delimiter is NIL no hierarchy exists
        if hierarchy_delimiter != 'NIL':
            hierarchy_delimiter = unquote(hierarchy_delimiter)
        else:
            hierarchy_delimiter = None

        self.sstatus['list_response'].append(
            parselist.Mailbox(name, attributes, hierarchy_delimiter))
Beispiel #12
0
    def STATUS_response(self, code, args):
        response = scan_sexp(args)
        it = iter(response[1])

        self.sstatus['status_response'] = dict(zip(it, it))
        self.sstatus['status_response']['mailbox'] = response[0]
Beispiel #13
0
    def STATUS_response(self, code, args):
        response = scan_sexp(args)
        it = iter(response[1])

        self.sstatus['status_response'] = dict(zip(it, it))
        self.sstatus['status_response']['mailbox'] = response[0]
Beispiel #14
0
 def THREAD_response(self, code, args):
     response = scan_sexp(args)
     self.sstatus['thread_response'] = response
Beispiel #15
0
 def NAMESPACE_response(self, code, args):
     response = scan_sexp(args)
     self.sstatus['namespace'] = response
Beispiel #16
0
    def MYRIGHTS_response(self, code, args):
        response = scan_sexp(args)

        self.sstatus["myrights_response"] = {"mailbox": response[0], "rights": response[1]}
Beispiel #17
0
    def MYRIGHTS_response(self, code, args):
        response = scan_sexp( args )

        self.sstatus['myrights_response'] = {
            'mailbox': response[0],
            'rights': response[1] }
Beispiel #18
0
 def NAMESPACE_response(self, code, args):
     response = scan_sexp( args )
     self.sstatus['namespace'] = response
Beispiel #19
0
 def THREAD_response(self, code, args):
     response = scan_sexp( args )
     self.sstatus['thread_response'] = response