Fix errors on Python 3.

Some unicode issues were fixed for Python 2 in 75748eb05d
but broke pretty much all Python 3 exceptions in Hy.
This commit is contained in:
Christopher Allan Webber 2014-02-23 17:16:56 -06:00
parent ecfd737fb9
commit d93f304220

View File

@ -21,6 +21,8 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
from hy._compat import PY3
import traceback
@ -137,7 +139,10 @@ class HyTypeError(TypeError):
(self.__class__.__name__,
self.message))
return result.encode('utf-8')
if not PY3:
return result.encode('utf-8')
else:
return result
class HyMacroExpansionError(HyTypeError):