]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Use if instead of assert to check for twisted ftp patch
authordavid-sarah <david-sarah@jacaranda.org>
Wed, 27 Jan 2010 01:55:29 +0000 (17:55 -0800)
committerdavid-sarah <david-sarah@jacaranda.org>
Wed, 27 Jan 2010 01:55:29 +0000 (17:55 -0800)
src/allmydata/frontends/ftpd.py

index 51330a78b6c7d921dcda4e8cd87c0c0516a298f6..3caf385e52896cbf11ccd2d4266e85ad48012542 100644 (file)
@@ -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)