Skip to content

Commit

Permalink
Fix open for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Nov 1, 2016
1 parent 4535f79 commit 435e9bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions krysa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import math
import string
import sqlite3
from io import open
import os.path as op
from functools import partial
from time import gmtime, strftime
Expand Down Expand Up @@ -964,8 +965,8 @@ def _save_project(self, selection=None, fname=None, *args):
# (dummy for now)
# dump widgets' properties from process flow to dict, then to json
project = {u'test': u'blah'}
with open(op.join(selection, fname), 'wb') as f:
f.write(json.dumps(project, indent=4))
with open(op.join(selection, fname), 'w', encoding='utf8') as f:
f.write(json.dumps(project, indent=4).decode('utf8'))

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

0 comments on commit 435e9bd

Please sign in to comment.