You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
unicode bug fix try #2...
this time, for sure!
This commit is contained in:
@@ -650,6 +650,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
out = out[:-self.pending_newlines]
|
||||
if (isinstance(out, str) and
|
||||
not (PYTHON3 or self.FUTURE_UNICODE_LITERALS)):
|
||||
from trepan.api import debug; debug()
|
||||
out = unicode(out, 'utf-8')
|
||||
self.f.write(out)
|
||||
|
||||
@@ -854,7 +855,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
# strings are interpreted:
|
||||
# u'xxx' -> 'xxx'
|
||||
# xxx' -> b'xxx'
|
||||
if isinstance(data, unicode):
|
||||
if not PYTHON3 and isinstance(data, unicode):
|
||||
try:
|
||||
try:
|
||||
data = str(data)
|
||||
|
Reference in New Issue
Block a user