mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
Remove old python 2 compatibility code
This commit is contained in:
parent
6519223b45
commit
0c8b8e9374
1 changed files with 1 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue