[Python-checkins] cpython (3.3): Fix #17967 - Fix related to regression on Windows.

senthil.kumaran python-checkins at python.org
Sun Jun 2 21:00:53 CEST 2013


http://hg.python.org/cpython/rev/f5906026a7e9
changeset: 84016:f5906026a7e9
branch: 3.3
parent: 84013:4c8426acd2cf
user: Senthil Kumaran <senthil at uthcode.com>
date: Sun Jun 02 11:59:47 2013 -0700
summary:
 Fix #17967 - Fix related to regression on Windows.
os.path.join(*self.dirs) produces an invalid path on windows.
ftp paths are always forward-slash seperated like this. /pub/dir.
files:
 Lib/urllib/request.py | 3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -2276,7 +2276,8 @@
 self.ftp = ftplib.FTP()
 self.ftp.connect(self.host, self.port, self.timeout)
 self.ftp.login(self.user, self.passwd)
- self.ftp.cwd(os.path.join(*self.dirs))
+ _target = '/'.join(self.dirs)
+ self.ftp.cwd(_target)
 
 def retrfile(self, file, type):
 import ftplib
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /