Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
De Boissieu Florian
generateds
Commits
b4bab658
Commit
b4bab658
authored
Nov 12, 2019
by
floriandeboissieu
Browse files
fix python 2 & 3 compat
parent
424f49fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
generateDS.py
View file @
b4bab658
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment