No subject

Fri Oct 8 09:19:47 EDT 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()

        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!


.=A0 =A0 Facundo


More information about the Twisted-Python mailing list