Lines Matching refs:resp

390                 resp, caps = self.capabilities()
449 resp = self._getline()
450 if self.debugging: print('*resp*', repr(resp))
451 resp = resp.decode(self.encoding, self.errors)
452 c = resp[:1]
454 raise NNTPTemporaryError(resp)
456 raise NNTPPermanentError(resp)
458 raise NNTPProtocolError(resp)
459 return resp
476 resp = self._getresp()
477 if resp[:3] not in _LONGRESP:
478 raise NNTPReplyError(resp)
505 return resp, lines
525 resp, list = self._getlongresp(file)
526 return resp, [line.decode(self.encoding, self.errors)
537 resp, lines = self._longcmdstring("LIST OVERVIEW.FMT")
558 resp, lines = self._longcmdstring("CAPABILITIES")
562 return resp, caps
577 resp, lines = self._longcmdstring(cmd, file)
578 return resp, self._grouplist(lines)
608 resp, lines = self._longcmdstring(command, file)
609 return resp, self._grouplist(lines)
614 resp, lines = self._longcmdstring('LIST NEWSGROUPS ' + group_pattern)
615 if not resp.startswith('215'):
619 resp, lines = self._longcmdstring('XGTITLE ' + group_pattern)
629 return resp, groups
661 resp = self._shortcmd('GROUP ' + name)
662 if not resp.startswith('211'):
663 raise NNTPReplyError(resp)
664 words = resp.split()
675 return resp, int(count), int(first), int(last), name
687 def _statparse(self, resp): argument
690 if not resp.startswith('22'):
691 raise NNTPReplyError(resp)
692 words = resp.split()
695 return resp, art_num, message_id
699 resp = self._shortcmd(line)
700 return self._statparse(resp)
726 resp, lines = self._longcmd(line, file)
727 resp, art_num, message_id = self._statparse(resp)
728 return resp, ArticleInfo(art_num, message_id, lines)
788 resp, lines = self._longcmdstring('XHDR {0} {1}'.format(hdr, str), file)
792 return resp, [remove_number(line) for line in lines]
803 resp, lines = self._longcmdstring('XOVER {0}-{1}'.format(start, end),
806 return resp, _parse_overview(lines, fmt)
831 resp, lines = self._longcmdstring(cmd, file)
833 return resp, _parse_overview(lines, fmt)
845 resp, raw_lines = self._longcmdstring('XGTITLE ' + group, file)
851 return resp, lines
863 resp = self._shortcmd('XPATH {0}'.format(id))
864 if not resp.startswith('223'):
865 raise NNTPReplyError(resp)
867 [resp_num, path] = resp.split()
869 raise NNTPReplyError(resp) from None
871 return resp, path
879 resp = self._shortcmd("DATE")
880 if not resp.startswith('111'):
881 raise NNTPReplyError(resp)
882 elem = resp.split()
884 raise NNTPDataError(resp)
887 raise NNTPDataError(resp)
888 return resp, _parse_datetime(date, None)
891 resp = self._shortcmd(command)
893 if not resp.startswith('3'):
894 raise NNTPReplyError(resp)
935 resp = self._shortcmd('QUIT')
938 return resp
962 resp = self._shortcmd('authinfo user ' + user)
963 if resp.startswith('381'):
965 raise NNTPReplyError(resp)
967 resp = self._shortcmd('authinfo pass ' + password)
968 if not resp.startswith('281'):
969 raise NNTPPermanentError(resp)
1005 resp = self._shortcmd('STARTTLS')
1006 if resp.startswith('382'):
1129 resp, count, first, last, name = s.group(args.group) variable
1138 resp, overviews = s.xover(first, last) variable