Commit b4bab658 authored by floriandeboissieu's avatar floriandeboissieu

fix python 2 & 3 compat

parent 424f49fd
......@@ -6999,11 +6999,17 @@ def makeFile(outFileName):
reply = input(
'File %s exists. Overwrite? (y/n): ' % outFileName)
if reply == 'y':
outFile = open(outFileName, 'w', encoding="utf-8")
if sys.version_info[0] == 2:
outFile = open(outFileName, 'w')
else:
outFile = open(outFileName, 'w', encoding="utf-8")
else:
sys.exit('Exiting. No output file.')
else:
outFile = open(outFileName, 'w', encoding="utf-8")
if sys.version_info[0] == 2:
outFile = open(outFileName, 'w')
else:
outFile = open(outFileName, 'w', encoding="utf-8")
return outFile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment