Use if instead of assert to check for twisted ftp patch
This commit is contained in:
parent
7d32fafc44
commit
100548257a
|
@ -289,7 +289,8 @@ class FTPServer(service.MultiService):
|
|||
# make sure we're using a patched Twisted that uses IWriteFile.close:
|
||||
# see docs/frontends/FTP-and-SFTP.txt and
|
||||
# http://twistedmatrix.com/trac/ticket/3462 for details.
|
||||
assert "close" in ftp.IWriteFile.names(), "your twisted is lacking a vital patch, see docs/frontends/FTP-and-SFTP.txt"
|
||||
if "close" not in ftp.IWriteFile.names():
|
||||
raise AssertionError("your twisted is lacking a vital patch, see docs/frontends/FTP-and-SFTP.txt")
|
||||
|
||||
r = Dispatcher(client)
|
||||
p = portal.Portal(r)
|
||||
|
|
Loading…
Reference in New Issue