
Oct. 31, 2006
4:15 p.m.
One more observation after looking at twisted code: twisted/protocols/basic.py funtion LineReceiver.dataReceived contains sth like that: why = self.lineReceived(line) if why or self.transport and self.transport.disconnecting: return why As this is WITHIN the loop, we see why returning deferred (or anything true) from lineReceived breaks processing. I did not search further but it seems somebody is using convention that if lineReceived (and maybe dataReceived) returns something, then this is an error. Why not exception??? And, is it possible to patch it somehow so lineReceived function could be unit-tested?