Skip to content

Commit

Permalink
Fix json dump
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Nov 5, 2016
1 parent 435e9bd commit 3699951
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion krysa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,12 @@ def _save_project(self, selection=None, fname=None, *args):
# dump widgets' properties from process flow to dict, then to json
project = {u'test': u'blah'}
with open(op.join(selection, fname), 'w', encoding='utf8') as f:
f.write(json.dumps(project, indent=4).decode('utf8'))
dump = json.dumps(project, indent=4)
try:
dump = dump.decode('utf8')
except AttributeError:
pass
f.write(dump)

# let user set table columns, add to tab, then:
self._export_data([data], 'data.sqlite')
Expand Down

0 comments on commit 3699951

Please sign in to comment.