diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py index 96b80816..95ceaf25 100644 --- a/ihatemoney/utils.py +++ b/ihatemoney/utils.py @@ -243,10 +243,7 @@ class IhmJSONEncoder(JSONEncoder): from flask_babel import speaklater if isinstance(o, speaklater.LazyString): - try: - return unicode(o) # For python 2. - except NameError: - return str(o) # For python 3. + return str(o) except ImportError: pass return JSONEncoder.default(self, o)