[Twisted-Python] Error using mktap for ResourceTemplates

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Oct 23 08:03:22 EDT 2002


On Wed, 23 Oct 2002 05:53:11 -0600, Bruce Mitchener <bruce at cubik.org> wrote:
> It still shouldn't error.  I've filed a bug in the SF tracker for this.

I just "fixed" this, using the existing idioms available used in mktap, but I
noticed 2 other problems while doing so.

 - currently the only idiom for reporting this sort of simple error is "print
   'foo'; sys.exit(2)".  This isn't really optimal, since we're hopefully going
   to be using twisted.tap through a non-commandline interface at some point,
   and the failure should be a formattable, self-contained exception.

 - the help message for almost every "tap" script is quite long, and so it's
   very easy to lose the default error reporting.  Perhaps it would be more
   useful in the common case to print exception/error information _after_ the
   help message, rather than before it, when there is a problem?

Thoughts?

-- 
 |    <`'>    |  Glyph Lefkowitz: Travelling Sorcerer  |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021023/d755d27a/attachment.pgp 


More information about the Twisted-Python mailing list