def MYRIGHTS_response(self, code, args): response = scan_sexp(args) self.sstatus['myrights_response'] = { 'mailbox': response[0], 'rights': response[1] }
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}
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}
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 }
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]) }
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]) }
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]), }
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] )
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])
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))
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))
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]
def THREAD_response(self, code, args): response = scan_sexp(args) self.sstatus['thread_response'] = response
def NAMESPACE_response(self, code, args): response = scan_sexp(args) self.sstatus['namespace'] = response
def MYRIGHTS_response(self, code, args): response = scan_sexp(args) self.sstatus["myrights_response"] = {"mailbox": response[0], "rights": response[1]}
def MYRIGHTS_response(self, code, args): response = scan_sexp( args ) self.sstatus['myrights_response'] = { 'mailbox': response[0], 'rights': response[1] }
def NAMESPACE_response(self, code, args): response = scan_sexp( args ) self.sstatus['namespace'] = response
def THREAD_response(self, code, args): response = scan_sexp( args ) self.sstatus['thread_response'] = response