]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/net/ftp/ftpscan.py
Fix import
[m_lib.git] / m_lib / net / ftp / ftpscan.py
index 469e44be58882796908c8546927cb156da6c1596..51c92f36c9f799f9f3dc319a540861d5dcddb194 100755 (executable)
@@ -4,7 +4,7 @@
 
 from __future__ import print_function
 import ftplib
-from m_lib.net.ftp.ftpparse import ftpparse
+from .ftpparse import ftpparse
 
 
 class FtpScanError(Exception): pass
@@ -165,7 +165,7 @@ def ftpscanrecursive(ftp_server, ftp_port=None, login=None, password=None,
       # The server does not implement LIST -R and
       # treats -R as a name of a directory (-:
       ftp.quit()
-      raise FtpScanError, "the server does not implement recursive listing"
+      raise FtpScanError("the server does not implement recursive listing")
    ftp.quit()
 
    tree = []
@@ -193,7 +193,7 @@ def ftpscanrecursive(ftp_server, ftp_port=None, login=None, password=None,
    tree.append((current_dir, files))
 
    if len(tree) == 1:
-      raise FtpScanError, "the server ignores -R in LIST"
+      raise FtpScanError("the server ignores -R in LIST")
 
    return tree