Skip to content

Commit

Permalink
python 2.7 test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Aug 24, 2017
1 parent 46f299d commit 7d7560f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jsonextended/edict.py
Original file line number Diff line number Diff line change
Expand Up @@ -1565,10 +1565,14 @@ def diff(new_dict, old_dict, iter_prefix='__iter__',
for path2, val2 in dct2_flat.items():
outcome['deletions'].append((path2, val2))

# remove any empty lists
# remove any empty lists and sort
for key in list(outcome.keys()):
if not outcome[key]:
outcome.pop(key)
try:
outcome[key] = sorted(outcome[key])
except:
pass

return outcome

Expand Down

0 comments on commit 7d7560f

Please sign in to comment.