No subject


Fri Oct 8 07:19:47 MDT 2010


1. The rest of the code only instantiates and uses DebugInfo
   "if self.debug".  Why this part of the code doesn't care about the
   self.debug flag and always uses it?  Is it intended and DebugInfo()
   not being used for debug is a misname left there for historical
   reasons?  Should I open a bug about this?

2. I did the following (ugly) hack to achieve my results:

    import twisted.internet.defer

    # ugliest thing I saw in a *long* time
    class MyDebugInfo(object):

        def _error_happened(self, failure):
            msg =3D failure.getTraceback()
            _expose_exception(msg)

        failResult =3D property(fset=3D_error_happened)

    twisted.internet.defer.DebugInfo =3D MyDebugInfo

   Is there a better way to do this?  Actually, this is working correctly,
   but I don't know if it's the right way to do it, and don't want to
   depend of DebugInfo() being called always in this case.

Thank you very much!

[0] http://launchpad.net/magicicada
[1] http://bugs.launchpad.net/magicicada/+bug/665681

--=20
.=A0 =A0 Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/



More information about the Twisted-Python mailing list