]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/net/ftp/ftpscan.py
Raise Error(message) for Py3 compatibility
[m_lib.git] / m_lib / net / ftp / ftpscan.py
index 469e44be58882796908c8546927cb156da6c1596..c3a4b5e23a19fcdc0138187fe381d91c87486acb 100755 (executable)
@@ -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