Bugs in 2.x relative import '.' and 1.x bytecode

This commit is contained in:
rocky
2022-05-14 17:42:30 -04:00
parent 021810bb2c
commit 656a9aa290
4 changed files with 20 additions and 5 deletions

View File

@@ -226,6 +226,8 @@ class Scanner(object):
# Locally we use list for more convenient iteration using indices
linestarts = list(self.opc.findlinestarts(code_obj))
self.linestarts = dict(linestarts)
if not self.linestarts:
return []
# 'List-map' which shows line number of current op and offset of
# first op on following line, given offset of op as index