Skip to content

Commit

Permalink
Merge pull request #17 from jiangwei221/master
Browse files Browse the repository at this point in the history
sort json keys
  • Loading branch information
Kwang Moo Yi authored Oct 28, 2018
2 parents 3685ca8 + c78f508 commit 68b72de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sps/salloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def write_job(job_fullpath, job_spec):
# Write the contents to a job
with Lock(lock_file):
with open(job_fullpath, "w") as ofp:
json.dump(job_spec, ofp)
json.dump(job_spec, ofp, sort_keys=True)


def write_env(job_fullpath, env):
Expand All @@ -131,7 +131,7 @@ def write_env(job_fullpath, env):
# write env to env_fullpath
with Lock(lock_file):
with open(env_fullpath, "w") as ofp:
json.dump(env, ofp)
json.dump(env, ofp, sort_keys=True)


# -----------------------------------------------------------------------------
Expand Down

0 comments on commit 68b72de

Please sign in to comment.