mozilla/kitsune — pull request #777 by willkg (2012-08-14 20:22:03+00:00)
Title: Fix logarithmic retry code

I bumped into this while fixing something else. The retry code used
to have an off-by-one and I must have fixed it in a way that it's now
essentially an off-by-two.

The gist of it is that prior to this fix, it wouldn't go through all
the retry attempts--it'd skip the last one. With this fix it now
goes through all the retry attempts.

Also, I fixed some syntax since we want to use the:

except Exception as exc:

syntax now.

Easiest thing is to look at the code and then run the tests, though none of the tests go through the logarithmic retry. In order to test that effectively, you have to tweak the code a bit. I'm positive this is correct (and more correct than the previous iteration), so if you want to skip the code tweaking, that'd be ok.

r?