From 100548257add900dd307100e192773426a0a45f7 Mon Sep 17 00:00:00 2001 From: david-sarah <david-sarah@jacaranda.org> Date: Tue, 26 Jan 2010 17:55:29 -0800 Subject: [PATCH] Use if instead of assert to check for twisted ftp patch --- src/allmydata/frontends/ftpd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/allmydata/frontends/ftpd.py b/src/allmydata/frontends/ftpd.py index 51330a78..3caf385e 100644 --- a/src/allmydata/frontends/ftpd.py +++ b/src/allmydata/frontends/ftpd.py @@ -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) -- 2.45.2