Skip to content

Commit 0c5f0df

Browse files
authored
support utf-8 in py3
1 parent 138b2ac commit 0c5f0df

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

uncompyle6/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ def _get_outstream(outfile):
4040
except OSError:
4141
pass
4242
if PYTHON_VERSION < 3.0:
43-
kw = {'mode':'wb'}
43+
return open(outfile, mode='wb')
4444
else:
45-
kw= = {'mode':'w', 'encoding':'utf-8'}
46-
return open(outfile, **kw)
45+
return open(outfile, mode='w', encoding='utf-8')
4746

4847
def decompile(
4948
bytecode_version, co, out=None, showasm=None, showast=False,

0 commit comments

Comments
 (0)