Raymond Hettinger
c88a6c75df
SF bug #1168983 : ftplib.py string index out of range
...
* resp[:1] in '123' # after Py2.2, this allowed blank responses to pass.
* replace <> with !=
* provide a usage message for empty command line calls
Backport candidate.
2005-04-05 04:31:09 +00:00
Walter Dörwald
70a6b49821
Replace backticks with repr() or "%r"
...
From SF patch #852334 .
2004-02-12 17:35:32 +00:00
Walter Dörwald
a401ae4010
Fix a regression from the 1.68->1.69 checkin:
...
string.split(foo, bar) must be foo.split(bar) instead of bar.split(foo).
2002-06-03 10:41:45 +00:00
Raymond Hettinger
54f0222547
SF 563203. Replaced 'has_key()' with 'in'.
2002-06-01 14:18:47 +00:00
Raymond Hettinger
094662a165
Replace boolean test with is None
2002-06-01 01:29:16 +00:00
Neal Norwitz
7ce734cd72
Use string methods where possible, and remove import string
2002-05-31 14:13:04 +00:00
Raymond Hettinger
e874fc304e
Closes SF patch 553277. Per GvR, reverting to original patch -- the way to
...
test if 'callable' has not been supplied is to test for None instead of
False. The previous correction to 'if callable()' was wrong because an unusable
callback would be ignored rather than raising an exception.
2002-05-12 05:53:51 +00:00
Martin v. Löwis
a8dd0941b8
Patch #553277 : Accept callbacks that are callable, not callbacks that are true.
2002-05-08 08:56:33 +00:00
Martin v. Löwis
b5255114d1
Access the exception argument to see whether it starts with '500'.
...
Fixes #527855 .
2002-03-10 15:59:58 +00:00
Martin v. Löwis
e12454f44a
The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715 .
...
Replaces calls to socket.send() (which isn't guaranteed to send all data)
with the new socket.sendall() method.
2002-02-16 23:06:19 +00:00
Tim Peters
e4418609f7
Whitespace normalization.
2002-02-16 07:34:19 +00:00
Guido van Rossum
24a643416d
Update the docstring too. :-)
2001-12-28 20:54:55 +00:00
Guido van Rossum
c33e077838
SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password
...
Instead of sending the real user and host, use "anonymous@" (i.e. no
host name at all!) as the default anonymous FTP password. This avoids
privacy violations.
2001-12-28 20:54:28 +00:00
Guido van Rossum
2826fade49
Don't set passiveserver to 0 in connect(). See SF bug #495693 .
...
This should definitely be backported to 2.2.1. I'll leave it to Jack
to decide whether he wants to fix this in MacPython 2.2.
2001-12-23 13:54:19 +00:00
Guido van Rossum
1f74cb3575
Oops. Catching OverflowError from int() doesn't help, since it raises
...
ValueError on too-large inputs.
2001-10-17 17:21:47 +00:00
Guido van Rossum
b6aca6afe2
Fix SF bug #459767 : ftplib fails with files > 2GB
...
size(), parse150(): try int() first, catch OverflowError, fall back to
long().
2001-10-16 19:45:52 +00:00
Martin v. Löwis
322c0d187d
Only close sockets if they have been created. Reported by Blake Winton.
2001-10-07 08:53:32 +00:00
Guido van Rossum
70297d3bd4
Change the 227 response parser to use a more liberal regular
...
expression. This is needed for certain servers that (in violation of
the standard) don't return the parentheses in the response.
This fixes SF bug #441712 by Henrik Weber (not exactly using his
patch).
2001-08-17 17:24:29 +00:00
Martin v. Löwis
2ad2569c72
Initialize msg to avoid unbound locals.
2001-07-31 08:40:21 +00:00
Martin v. Löwis
4eb5940a4d
Untabify IPv6 changes.
2001-07-26 13:37:33 +00:00
Martin v. Löwis
a43c2f845e
Patch #401196 : Use getaddrinfo and AF_INET6 in TCP servers and clients.
2001-07-24 20:34:08 +00:00
Jeremy Hylton
0e8468c8ba
remove global decl about unused variable
2001-04-09 04:31:50 +00:00
Fred Drake
9c98a428ef
Move some constant initialization from FTP.__init__() and FTP.connect()
...
to the class namespace.
Allow FTP.close() to be called more than once without tossing cookies.
(This seems to be a fairly common idiom for .close() methods, so let's
try to be consistent.)
2001-02-28 21:46:37 +00:00
Guido van Rossum
4ac83474a3
Provide a default for the blocksize arg of storbinary().
...
SF patch #103517 by mfx.
2001-02-15 13:50:36 +00:00
Eric S. Raymond
c95bf69fce
String method conversion.
2001-02-09 10:06:47 +00:00