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:
parent
ecfd737fb9
commit
d93f304220
@ -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))
|
||||
|
||||
if not PY3:
|
||||
return result.encode('utf-8')
|
||||
else:
|
||||
return result
|
||||
|
||||
|
||||
class HyMacroExpansionError(HyTypeError):
|
||||
|
Loading…
Reference in New Issue
Block a user