You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
In Python 2.2- preserve line numbers
This commit is contained in:
@@ -224,10 +224,7 @@ class Scanner(object):
|
||||
|
||||
# Offset: lineno pairs, only for offsets which start line.
|
||||
# Locally we use list for more convenient iteration using indices
|
||||
if self.version > (1, 4):
|
||||
linestarts = list(self.opc.findlinestarts(code_obj))
|
||||
else:
|
||||
linestarts = [[0, 1]]
|
||||
linestarts = list(self.opc.findlinestarts(code_obj))
|
||||
self.linestarts = dict(linestarts)
|
||||
|
||||
# 'List-map' which shows line number of current op and offset of
|
||||
|
Reference in New Issue
Block a user