From: david-sarah Date: Wed, 27 Jan 2010 01:55:29 +0000 (-0800) Subject: Use if instead of assert to check for twisted ftp patch X-Git-Tag: allmydata-tahoe-1.6.0~13 X-Git-Url: https://git.rkrishnan.org/frontends/webapi.rst?a=commitdiff_plain;h=100548257add900dd307100e192773426a0a45f7;p=tahoe-lafs%2Ftahoe-lafs.git Use if instead of assert to check for twisted ftp patch --- 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)