[Twisted-Python] [cpushare at cpushare.com: CPUShare Exception]

Andrea Arcangeli andrea at cpushare.com
Thu Jul 7 23:13:27 EDT 2005

On Thu, Jul 07, 2005 at 11:06:51AM -0400, Jp Calderone wrote:
> When I did this, I settled on hashing just the qual of the exception class 

I guess the qual would be failure.value.__class__.__module__ +
failure.value.__class__.__name__ or did I misunderstood?

Isn't it simpler to hash on failure.value.__class__ instead of the qual?

> and the brief string (failure.getErrorMessage()) version of it.  This has a 

That's neat too, the only disavantage compared to glyph's approach is
that the stack trace could be different but the exception the same,
stuff like AttributeError is quite common. gliph's example code wouldn't
risk to lose different stack traces.

The counter is good enough for now but I'll probably stack it on top of
glyph's appraoch in the future.

Thanks for the interesting hints!

More information about the Twisted-Python mailing list