class ReconnectingFTPWrapper:
ReconnectingFTPCallWrapperClass = ReconnectingFTPCallWrapper
- def __init__(self, ftp, ftp_server, ftp_port=None, login=None, password=None, ftp_dir='/', tree=None):
+ def __init__(self, ftp, ftp_server, ftp_port=0, login=None, password=None, ftp_dir='/', tree=None):
self._ftp = ftp
self._ftp_server = ftp_server
self._ftp_port = ftp_port
ftp.cwd("..")
-def ftpscan1(ftp_server, ftp_port=None, login=None, password=None,
+def ftpscan1(ftp_server, ftp_port=0, login=None, password=None,
ftp_dir='/', passive=None, FTPClass=ftplib.FTP, reconnect=False,
ReconnectingFTPWrapperClass=ReconnectingFTPWrapper):
"""Recursive FTP scan using one-by-one directory traversing. It is slow
return tree
-def ftpscanrecursive(ftp_server, ftp_port=None, login=None, password=None,
+def ftpscanrecursive(ftp_server, ftp_port=0, login=None, password=None,
ftp_dir='/', passive=None, FTPClass=ftplib.FTP, reconnect=False):
"""
Recursive FTP scan using fast LIST -R command. Not all servers supports
return tree
-def ftpscan(ftp_server, ftp_port=None, login=None, password=None,
+def ftpscan(ftp_server, ftp_port=0, login=None, password=None,
ftp_dir='/', passive=None, FTPClass=ftplib.FTP):
try:
return ftpscanrecursive(ftp_server, ftp_port, login, password, ftp_dir, passive, FTPClass)