1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-07-29 01:03:28 +02:00

MlString: ensure __str__() will always output same string by ordering the keys

This commit is contained in:
ArnAud 2015-09-24 14:18:06 +02:00
commit 218d1f9afc

View file

@ -38,7 +38,7 @@ class MlString(object):
# @return A json dump of the MlString::translations dict
def __str__(self):
if self.translations:
return json.dumps(self.translations)
return json.dumps(self.translations, sort_keys=True)
else:
return ""