#926 closed enhancement (fixed)

FTP frontend: Improve message if Twisted is unpatched

Reported by: ndurner Owned by:
Priority: minor Milestone: 1.6.0
Component: code-frontend Version: 1.5.0
Keywords: ftp twisted error usability Cc:
Launchpad Bug:

Description

It took me a while to remember that the message "your twisted is lacking" actually means that its FTP module needs to be patched.

Attachments (2)

tahoe-ftp-msg.diff (611 bytes) - added by ndurner at 2010-01-23T15:34:51Z.
if-instead-of-assert-darcspatch.txt (41.2 KB) - added by davidsarah at 2010-01-27T02:08:18Z.
Use if instead of assert to check for twisted ftp patch

Download all attachments as: .zip

Change History (7)

Changed at 2010-01-23T15:34:51Z by ndurner

comment:1 Changed at 2010-01-24T22:07:30Z by davidsarah

  • Keywords reviewed ftp twisted error usability added

Reviewed, should be applied for 1.6.

comment:2 follow-up: Changed at 2010-01-26T14:54:35Z by zooko

  • Milestone changed from undecided to 1.6.0
  • Resolution set to fixed
  • Status changed from new to closed

Hm, we don't like to use assert for flow control. For one thing, assertions are not checked if the PYTHONOPTIMIZE env var is set or if -O is passed to the Python command-line. So for future reference, checks like this should be done with normal old if statements instead of assertions.

But, I'm going to apply this patch, which is just about making the error message more useful.

Thanks!

fixed by 4a4305e7e6514dcf

Changed at 2010-01-27T02:08:18Z by davidsarah

Use if instead of assert to check for twisted ftp patch

comment:3 in reply to: ↑ 2 Changed at 2010-01-27T02:09:06Z by davidsarah

  • Keywords review-needed added; reviewed removed

Replying to zooko:

Hm, we don't like to use assert for flow control.

I agree, patch attached.

comment:4 Changed at 2010-02-01T05:12:18Z by zooko

applied David-Sarah's patch in 100548257add900d; Thanks!

comment:5 Changed at 2010-02-01T05:12:37Z by zooko

  • Keywords review-needed removed
Note: See TracTickets for help on using tickets.