Lines Matching refs:typ

359         typ, dat = self._untagged_response('OK', [None], name)
361 return typ, dat
362 typ, dat = self.noop() # Prod server for response
363 return self._untagged_response(typ, dat, name)
428 typ, dat = self._simple_command('AUTHENTICATE', mech)
429 if typ != 'OK':
432 return typ, dat
440 typ, dat = self._simple_command(name)
441 return self._untagged_response(typ, dat, name)
461 typ, dat = self._simple_command('CLOSE')
464 return typ, dat
504 typ, data = self._simple_command('ENABLE', capability)
505 if typ == 'OK' and 'UTF8=ACCEPT' in capability.upper():
507 return typ, data
519 typ, dat = self._simple_command(name)
520 return self._untagged_response(typ, dat, name)
534 typ, dat = self._simple_command(name, message_set, message_parts)
535 return self._untagged_response(typ, dat, name)
543 typ, dat = self._simple_command('GETACL', mailbox)
544 return self._untagged_response(typ, dat, 'ACL')
551 typ, dat = self._simple_command('GETANNOTATION', mailbox, entry, attribute)
552 return self._untagged_response(typ, dat, 'ANNOTATION')
562 typ, dat = self._simple_command('GETQUOTA', root)
563 return self._untagged_response(typ, dat, 'QUOTA')
571 typ, dat = self._simple_command('GETQUOTAROOT', mailbox)
572 typ, quota = self._untagged_response(typ, dat, 'QUOTA')
573 typ, quotaroot = self._untagged_response(typ, dat, 'QUOTAROOT')
574 return typ, [quotaroot, quota]
585 typ, dat = self._simple_command(name, directory, pattern)
586 return self._untagged_response(typ, dat, name)
596 typ, dat = self._simple_command('LOGIN', user, self._quote(password))
597 if typ != 'OK':
600 return typ, dat
628 try: typ, dat = self._simple_command('LOGOUT')
629 except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]]
633 return typ, dat
644 typ, dat = self._simple_command(name, directory, pattern)
645 return self._untagged_response(typ, dat, name)
652 typ,dat = self._simple_command('MYRIGHTS', mailbox)
653 return self._untagged_response(typ, dat, 'MYRIGHTS')
661 typ, dat = self._simple_command(name)
662 return self._untagged_response(typ, dat, name)
684 typ, dat = self._simple_command(name, message_num, message_part, start, length)
685 return self._untagged_response(typ, dat, 'FETCH')
721 typ, dat = self._simple_command(name, 'CHARSET', charset, *criteria)
723 typ, dat = self._simple_command(name, *criteria)
724 return self._untagged_response(typ, dat, name)
745 typ, dat = self._simple_command(name, mailbox)
746 if typ != 'OK':
748 return typ, dat
756 return typ, self.untagged_responses.get('EXISTS', [None])
771 typ, dat = self._simple_command('SETANNOTATION', *args)
772 return self._untagged_response(typ, dat, 'ANNOTATION')
780 typ, dat = self._simple_command('SETQUOTA', root, limits)
781 return self._untagged_response(typ, dat, 'QUOTA')
794 typ, dat = self._simple_command(name, sort_criteria, charset, *search_criteria)
795 return self._untagged_response(typ, dat, name)
809 typ, dat = self._simple_command(name)
810 if typ == 'OK':
818 return self._untagged_response(typ, dat, name)
829 typ, dat = self._simple_command(name, mailbox, names)
830 return self._untagged_response(typ, dat, name)
840 typ, dat = self._simple_command('STORE', message_set, command, flags)
841 return self._untagged_response(typ, dat, 'FETCH')
858 typ, dat = self._simple_command(name, threading_algorithm, charset, *search_criteria)
859 return self._untagged_response(typ, dat, name)
879 typ, dat = self._simple_command(name, command, *args)
884 return self._untagged_response(typ, dat, name)
917 def _append_untagged(self, typ, dat): argument
924 (typ, len(ur.get(typ,'')), dat))
925 if typ in ur:
926 ur[typ].append(dat)
928 ur[typ] = [dat]
946 for typ in ('OK', 'NO', 'BAD'):
947 if typ in self.untagged_responses:
948 del self.untagged_responses[typ]
1019 typ, data = self._get_tagged_response(tag)
1026 if typ == 'BAD':
1027 raise self.error('%s command error: %s %s' % (name, typ, data))
1028 return typ, data
1032 typ, dat = self.capability()
1056 typ = self.mo.group('type')
1057 typ = str(typ, self._encoding)
1059 self.tagged_commands[tag] = (typ, [dat])
1078 typ = self.mo.group('type')
1079 typ = str(typ, self._encoding)
1098 self._append_untagged(typ, (dat, data))
1104 self._append_untagged(typ, dat)
1108 if typ in ('OK', 'NO', 'BAD') and self._match(Response_code, dat):
1109 typ = self.mo.group('type')
1110 typ = str(typ, self._encoding)
1111 self._append_untagged(typ, self.mo.group('data'))
1114 if self.debug >= 1 and typ in ('NO', 'BAD', 'BYE'):
1115 self._mesg('%s response: %r' % (typ, dat))
1199 def _untagged_response(self, typ, dat, name): argument
1200 if typ == 'NO':
1201 return typ, dat
1203 return typ, [None]
1208 return typ, data
1568 typ, dat = getattr(M, cmd)(*args)
1569 M._mesg('%s => %s %s' % (cmd, typ, dat))
1570 if typ == 'NO': raise dat[0]