You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
Allow deparsed out to be str as well as unicode
This commit is contained in:
@@ -549,6 +549,8 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
|
|
||||||
if self.pending_newlines:
|
if self.pending_newlines:
|
||||||
out = out[:-self.pending_newlines]
|
out = out[:-self.pending_newlines]
|
||||||
|
if isinstance(out, str):
|
||||||
|
out = unicode(out, 'utf-8')
|
||||||
self.f.write(out)
|
self.f.write(out)
|
||||||
|
|
||||||
def println(self, *data):
|
def println(self, *data):
|
||||||
|
Reference in New Issue
Block a user