Skip to content

Commit

Permalink
Revert "Parse put into yaml instead of json"
Browse files Browse the repository at this point in the history
This reverts commit 621d946.

I put the yaml version in just in case it's needed in future :)
  • Loading branch information
devcurmudgeon committed Apr 29, 2016
1 parent 621d946 commit 0ff0e98
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ybd/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,10 @@ def __init__(self, directory='.'):
pass

if app.config.get('mode') == 'parse-only':
noalias_dumper = yaml.dumper.SafeDumper
noalias_dumper.ignore_aliases = lambda self, data: True
with open(app.config['result-file'], 'w') as f:
f.write(yaml.dump(self._definitions,
default_flow_style=False,
Dumper=noalias_dumper))
app.log('RESULT', 'Parsed definitions data in yaml format is at',
f.write(json.dumps(self._definitions, indent=4,
sort_keys=True))
app.log('RESULT', 'Parsed definitions data in json format is at',
app.config['result-file'])
os._exit(0)

Expand Down

0 comments on commit 0ff0e98

Please sign in to comment.