Exceptions won't have a `__unicode__` attribute in Python 3, so they'll go into the else block. I don't think 2to3 modifies hasattr calls, unless you've souped it up somehow.