-
Committer:
John Arbash Meinel
-
Date:
2010-05-19 17:06:38 UTC
-
mto:
(4634.151.4 2.0)
-
mto:
This revision was merged to the branch mainline in
revision
5243.
-
Revision ID:
john@arbash-meinel.com-20100519170638-l82bqgaw2hp03cwm
Workaround a bug (#582656) in recent versions of Pyrex.
It seems that if you use:
except Exception:
Recent versions of Pyrex (0.9.8.6? and 0.9.9) leave the exception state set.
Which means that if in the except: clause you have something like object comparison
it checks PyErr_Occurred and then re-raises the exception you were trapping.
The workaround is to always use:
except Exception, e:
style syntax.
I used 'except Exception, _:' to make it clear we weren't touching the error,
and because there was a place or two where we *were* making use of a variable
named 'e' (caught by a different exception path).