diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index b8cce1f766b..8103502404d 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -336,7 +336,8 @@ def _safe_import_hook(self, name, caller, fromlist, level=-1): fullname = name + "." + sub self._add_badmodule(fullname, caller) - def scan_opcodes(self, co): + def scan_opcodes_25(self, co, + unpack = struct.unpack): # Scan the code, and yield 'interesting' opcode combinations code = co.co_code names = co.co_names @@ -359,7 +360,7 @@ def scan_opcodes(self, co): def scan_code(self, co, m): code = co.co_code - scanner = self.scan_opcodes + scanner = self.scan_opcodes_25 for what, args in scanner(co): if what == "store": name, = args