Skip to content

Commit

Permalink
put provennace first
Browse files Browse the repository at this point in the history
  • Loading branch information
doutriaux1 committed Jul 10, 2019
1 parent 55cccc6 commit ec93e57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pcmdi_metrics/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,9 @@ def write(self, data, type='json', *args, **kwargs):
data["json_version"] = json_version
data["json_structure"] = json_structure
f = open(file_name, 'w')
data["provenance"] = generateProvenance()
json.dump(data, f, cls=CDMSDomainsEncoder, *args, **kwargs)
out_dict = OrderedDict({"provenance": generateProvenance()})
out_dict.update(data)
json.dump(out_dict, f, cls=CDMSDomainsEncoder, *args, **kwargs)
f.close()

elif self.type in ['asc', 'ascii', 'txt']:
Expand Down

0 comments on commit ec93e57

Please sign in to comment.