summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-02-14 16:06:24 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-02-14 16:06:24 (GMT)
commit2bb57b81f211f5c16d9542620b180dd5097d57c7 (patch)
tree48bbd277e7850dd5741cc32ba1e5218921821850 /Lib/ftplib.py
parent0d12ead05cf43d3a8f6e79a1b20fc56c7fb5bc86 (diff)
downloadcpython-2bb57b81f211f5c16d9542620b180dd5097d57c7.zip
cpython-2bb57b81f211f5c16d9542620b180dd5097d57c7.tar.gz
cpython-2bb57b81f211f5c16d9542620b180dd5097d57c7.tar.bz2
Changed makefile() args from r/w to rb/wb, for non-unix compatability.
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r--Lib/ftplib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index e6e1a3a..59eef65 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -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`