• Home
  • Raw
  • Download

Lines Matching refs:resp

217         resp = self.getmultiline()
218 if self.debugging: print '*resp*', self.sanitize(resp)
219 self.lastresp = resp[:3]
220 c = resp[:1]
222 return resp
224 raise error_temp, resp
226 raise error_perm, resp
227 raise error_proto, resp
231 resp = self.getresp()
232 if resp[:1] != '2':
233 raise error_reply, resp
234 return resp
244 resp = self.getmultiline()
245 if resp[:3] not in ('426', '225', '226'):
246 raise error_proto, resp
305 resp = self.sendport(host, port)
307 resp = self.sendeprt(host, port)
341 resp = self.sendcmd(cmd)
348 if resp[0] == '2':
349 resp = self.getresp()
350 if resp[0] != '1':
351 raise error_reply, resp
360 resp = self.sendcmd(cmd)
362 if resp[0] == '2':
363 resp = self.getresp()
364 if resp[0] != '1':
365 raise error_reply, resp
371 if resp[:3] == '150':
373 size = parse150(resp)
394 resp = self.sendcmd('USER ' + user)
395 if resp[0] == '3': resp = self.sendcmd('PASS ' + passwd)
396 if resp[0] == '3': resp = self.sendcmd('ACCT ' + acct)
397 if resp[0] != '2':
398 raise error_reply, resp
399 return resp
440 resp = self.sendcmd('TYPE A')
550 resp = self.sendcmd('RNFR ' + fromname)
551 if resp[0] != '3':
552 raise error_reply, resp
557 resp = self.sendcmd('DELE ' + filename)
558 if resp[:3] in ('250', '200'):
559 return resp
561 raise error_reply, resp
579 resp = self.sendcmd('SIZE ' + filename)
580 if resp[:3] == '213':
581 s = resp[3:].strip()
589 resp = self.sendcmd('MKD ' + dirname)
590 return parse257(resp)
598 resp = self.sendcmd('PWD')
599 return parse257(resp)
603 resp = self.voidcmd('QUIT')
605 return resp
689 resp = self.voidcmd('AUTH TLS')
691 resp = self.voidcmd('AUTH SSL')
695 return resp
709 resp = self.voidcmd('PROT P')
711 return resp
715 resp = self.voidcmd('PROT C')
717 return resp
746 resp = self.sendcmd('TYPE A')
813 def parse150(resp): argument
818 if resp[:3] != '150':
819 raise error_reply, resp
824 m = _150_re.match(resp)
836 def parse227(resp): argument
841 if resp[:3] != '227':
842 raise error_reply, resp
847 m = _227_re.search(resp)
849 raise error_proto, resp
856 def parse229(resp, peer): argument
861 if resp[:3] != '229':
862 raise error_reply, resp
863 left = resp.find('(')
864 if left < 0: raise error_proto, resp
865 right = resp.find(')', left + 1)
867 raise error_proto, resp # should contain '(|||port|)'
868 if resp[left + 1] != resp[right - 1]:
869 raise error_proto, resp
870 parts = resp[left + 1:right].split(resp[left+1])
872 raise error_proto, resp
878 def parse257(resp): argument
883 if resp[:3] != '257':
884 raise error_reply, resp
885 if resp[3:5] != ' "':
889 n = len(resp)
891 c = resp[i]
894 if i >= n or resp[i] != '"':
1080 resp = ftp.sendcmd(cmd)