Commit 89fcddaa authored by Terry Jan Reedy's avatar Terry Jan Reedy

Idlelib: forward port changes that silenced 2.7 -3 deprecation warnings and

which are at least as efficient. On Py3, unpacking exceptions never works.
parent 585755cb
...@@ -254,8 +254,7 @@ class Debugger: ...@@ -254,8 +254,7 @@ class Debugger:
self.sync_source_line() self.sync_source_line()
def show_frame(self, stackitem): def show_frame(self, stackitem):
frame, lineno = stackitem self.frame = stackitem[0] # lineno is stackitem[1]
self.frame = frame
self.show_variables() self.show_variables()
localsviewer = None localsviewer = None
......
...@@ -83,11 +83,9 @@ class SearchEngine: ...@@ -83,11 +83,9 @@ class SearchEngine:
try: try:
prog = re.compile(pat, flags) prog = re.compile(pat, flags)
except re.error as what: except re.error as what:
try: args = what.args
msg, col = what msg = args[0]
except: col = arg[1] if len(args) >= 2 else -1
msg = str(what)
col = -1
self.report_error(pat, msg, col) self.report_error(pat, msg, col)
return None return None
return prog return prog
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment