Changed makefile() args from r/w to rb/wb, for non-unix compatability.

This commit is contained in:
Jack Jansen 1996-02-14 16:06:24 +00:00
parent 0d12ead05c
commit 2bb57b81f2
5 changed files with 7 additions and 7 deletions

View file

@ -95,7 +95,7 @@ class FTP:
if port: self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.connect(self.host, self.port)
self.file = self.sock.makefile('r')
self.file = self.sock.makefile('rb')
self.welcome = self.getresp()
# Get the welcome message from the server
@ -288,7 +288,7 @@ class FTP:
if not callback: callback = print_line
resp = self.sendcmd('TYPE A')
conn = self.transfercmd(cmd)
fp = conn.makefile('r')
fp = conn.makefile('rb')
while 1:
line = fp.readline()
if self.debugging > 2: print '*retr*', `line`