Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/schemes/ftplink.py
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2005-04-07 22:05:37 +0200
committerArthur de Jong <arthur@arthurdejong.org>2005-04-07 22:05:37 +0200
commit69d183363cab127659591fa49a335ab91205f0e9 (patch)
tree3ccc41069f91a1eb447dea457ed012da5e976240 /schemes/ftplink.py
parentc3bee4829c653b29984e7e2bea9945fd0e843367 (diff)
tabs to spaces (tabs are evil)
git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@12 86f53f14-5ff3-0310-afe5-9b438ce3f40c
Diffstat (limited to 'schemes/ftplink.py')
-rw-r--r--schemes/ftplink.py24
1 files changed, 12 insertions, 12 deletions
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