leah/python-oauth — pull request #3 by xrg (2012-04-18 06:58:24+00:00)
Title: oauth: narrow on exception handling

It is generally not advisable to use "except:" in python, because it would
catch "KeyboardInterrupt" and "SystemExit", meant only to be caught at
main() level. Only catch the ones we really expect to see, let others
propagate up the stack.

Also, when computing the HMAC, we shall not retry w/o hashlib in the case
that first hashing has gone wrong. This confuses the error message between
a missing import and a bad supplied hash.