diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 16:22:22 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-26 16:22:22 -0500 |
commit | b2c8d8dede8aeab37b53f6c8d923865db13fc7ec (patch) | |
tree | 46a3762e7ca3be99877476d3bf3265eef2e8cb4f | |
parent | b59434fe72cbbf035c1dcbc52bd0eb012c6228e4 (diff) |
sort settings keys, to ensure the same order for debugging and jcache comparisons
-rwxr-xr-x | emscripten.py | 2 | ||||
-rw-r--r-- | tools/shared.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py index b766cfb4..dc5d5f5b 100755 --- a/emscripten.py +++ b/emscripten.py @@ -131,7 +131,7 @@ def emscript(infile, settings, outfile, libraries=[]): settings_file = temp_files.get('.txt').name def save_settings(): global settings_text - settings_text = json.dumps(settings) + settings_text = json.dumps(settings, sort_keys=True) s = open(settings_file, 'w') s.write(settings_text) s.close() diff --git a/tools/shared.py b/tools/shared.py index d587a071..b0fe45d8 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -554,7 +554,7 @@ class Settings: ret = [] for key, value in Settings.__dict__.iteritems(): if key == key.upper(): # this is a hack. all of our settings are ALL_CAPS, python internals are not - jsoned = json.dumps(value) + jsoned = json.dumps(value, sort_keys=True) ret += ['-s', key + '=' + jsoned] return ret |