From 701e5cd1da2641e17a7d574af973e590e3d27866 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Mon, 6 Oct 2008 18:14:11 -0700
Subject: [PATCH] ftpd: make sure we're using a patched/fixed Twisted, to avoid
 confusion later

---
 src/allmydata/ftpd.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/allmydata/ftpd.py b/src/allmydata/ftpd.py
index eb475c91..4bd84098 100644
--- a/src/allmydata/ftpd.py
+++ b/src/allmydata/ftpd.py
@@ -380,6 +380,10 @@ class FTPServer(service.MultiService):
             # we could leave this anonymous, with just the /uri/CAP form
             raise RuntimeError("must provide some translation")
 
+        # make sure we're using a patched Twisted that uses IWriteFile.close:
+        # see docs/ftp.txt for details.
+        assert "close" in ftp.IWriteFile.names(), "your twisted is lacking"
+
         r = Dispatcher(client)
         p = portal.Portal(r)
         p.registerChecker(c)
-- 
2.45.2