Skip to content

Commit

Permalink
Arch: survey: py3-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
looooo authored and wwmayer committed Jun 10, 2018
1 parent 41b278a commit 617dfa0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Mod/Arch/ArchCommands.py
Expand Up @@ -1076,7 +1076,11 @@ def exportCSV(self):
if rows:
filename = QtGui.QFileDialog.getSaveFileName(QtGui.QApplication.activeWindow(), translate("Arch","Export CSV File"), None, "CSV file (*.csv)");
if filename:
with open(filename[0].encode("utf8"), 'wb') as csvfile:
if sys.version_info.major < 3:
mode = 'wb'
else:
mode = 'w'
with open(filename[0].encode("utf8"), mode) as csvfile:
csvfile = csv.writer(csvfile,delimiter="\t")
suml = 0
for i in range(rows):
Expand Down

0 comments on commit 617dfa0

Please sign in to comment.