TrafficLoggingFactory instance has no attribute 'deferred'

[email protected] Sat, 29 Aug 2009 08:13:28 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from truekonrads <[email protected]>:

I am using TrafficLoggingFactory like this:

{{{
        httpfactory=HTTPClientFactory(url, *args, **kwargs)
        factory = TrafficLoggingFactory(httpfactory, inoutlog)
        if scheme == 'https':
            from twisted.internet import ssl
            if contextFactory is None:
                contextFactory = NoVerifyClientContextFactory()
            reactor.connectSSL(host, port, factory, contextFactory)
        else:
            reactor.connectTCP(host, port, factory)
}}}
And in WrappingFactory.startFactory which is ancestor to TrafficLoggingFactory, there is self.deferred.callback(None), but self.deferred is None, which causes the above exception.

I think that twised.test.test_policies.LoggingFactoryTestCase does not cover this area.

----------
Type     : defect
Component: core
Keywords : 
Priority : normal
Nosy     : truekonrads
----------
http://twistedmatrix.com/trac/ticket/3991