Kaydet (Commit) 4f9181ee authored tarafından Guido van Rossum's avatar Guido van Rossum

improve treatment of multi-line replies, ignore empty lines

üst 1134991f
......@@ -114,7 +114,7 @@ def getreply(f):
line = f.readline()
if not line: break # Really an error
print line,
if line[:3] == code: break
if line[:3] == code and line[3:4] != '-': break
return code
......@@ -134,7 +134,9 @@ def getdata(r):
#
def getcommand():
try:
return raw_input('ftp.py> ')
while 1:
line = raw_input('ftp.py> ')
if line: return line
except EOFError:
return ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment