From 69d183363cab127659591fa49a335ab91205f0e9 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Thu, 7 Apr 2005 20:05:37 +0000 Subject: tabs to spaces (tabs are evil) git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@12 86f53f14-5ff3-0310-afe5-9b438ce3f40c --- schemes/ftplink.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'schemes/ftplink.py') diff --git a/schemes/ftplink.py b/schemes/ftplink.py index 08fdeeb..6646def 100644 --- a/schemes/ftplink.py +++ b/schemes/ftplink.py @@ -49,7 +49,7 @@ def init(self, url, parent): if filename not in ftp.nlst(): raise ftplib.error_perm, "No such file or directory" except ftplib.all_errors, errtext: - self.set_bad_link(self.URL, str(errtext)) + self.set_bad_link(self.URL, str(errtext)) try: ftp.quit() except: @@ -118,27 +118,27 @@ def size(pathname,ftpobject): def cwd(dirs, ftpobject): for dir in dirs: - ftpobject.cwd(dir) + ftpobject.cwd(dir) def parseurl(url): parsed = urlparse.urlparse(url) host = parsed[1] if '@' in host: - userpass, host = string.split(host,'@') - if ':' in userpass: - user, passwd = string.split(userpass,':') - else: - user = userpass - passwd = None + userpass, host = string.split(host,'@') + if ':' in userpass: + user, passwd = string.split(userpass,':') + else: + user = userpass + passwd = None else: - user = 'anonymous' + user = 'anonymous' passwd = '' # Filled in by ftplib. if ':' in host: - host, port = string.split(host,':') - port = int(port) + host, port = string.split(host,':') + port = int(port) else: - port = ftplib.FTP_PORT + port = ftplib.FTP_PORT pathname = parsed[2] if not port: port = ftplib.FTP_PORT -- cgit v1.2.3