summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-07-02 01:33:46 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-07-02 01:33:46 (GMT)
commit5e456973a5de01082f9233beffb7fd2b05f6f9b0 (patch)
treee173f4a33f6d8e1280df76f71715388fff7776b5
parent509dab9ef6ac6135477b9094162f52420c1f1c47 (diff)
parent092b3cf67117b3857f111bdb752e847eebd9e9b6 (diff)
downloadcpython-5e456973a5de01082f9233beffb7fd2b05f6f9b0.zip
cpython-5e456973a5de01082f9233beffb7fd2b05f6f9b0.tar.gz
cpython-5e456973a5de01082f9233beffb7fd2b05f6f9b0.tar.bz2
Merge with 3.4
-rw-r--r--Lib/idlelib/SearchEngine.py2
-rw-r--r--Lib/idlelib/StackViewer.py4
-rw-r--r--Lib/idlelib/idle_test/test_textview.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/Lib/idlelib/SearchEngine.py b/Lib/idlelib/SearchEngine.py
index da42bd9..099cb09 100644
--- a/Lib/idlelib/SearchEngine.py
+++ b/Lib/idlelib/SearchEngine.py
@@ -85,7 +85,7 @@ class SearchEngine:
except re.error as what:
args = what.args
msg = args[0]
- col = arg[1] if len(args) >= 2 else -1
+ col = args[1] if len(args) >= 2 else -1
self.report_error(pat, msg, col)
return None
return prog
diff --git a/Lib/idlelib/StackViewer.py b/Lib/idlelib/StackViewer.py
index ed2c9e7..b1e5e26 100644
--- a/Lib/idlelib/StackViewer.py
+++ b/Lib/idlelib/StackViewer.py
@@ -131,8 +131,8 @@ def _stack_viewer(parent):
root.geometry("+%d+%d"%(x, y + 150))
flist = PyShellFileList(root)
try: # to obtain a traceback object
- a
- except:
+ intentional_name_error
+ except NameError:
exc_type, exc_value, exc_tb = sys.exc_info()
# inject stack trace to sys
diff --git a/Lib/idlelib/idle_test/test_textview.py b/Lib/idlelib/idle_test/test_textview.py
index a9b60ca..68e5b82 100644
--- a/Lib/idlelib/idle_test/test_textview.py
+++ b/Lib/idlelib/idle_test/test_textview.py
@@ -12,7 +12,7 @@ requires('gui')
import unittest
import os
-from tkinter import Tk, Text, TclError
+from tkinter import Tk
from idlelib import textView as tv
from idlelib.idle_test.mock_idle import Func
from idlelib.idle_test.mock_tk import Mbox
@@ -23,7 +23,7 @@ def setUpModule():
def tearDownModule():
global root
- root.destroy()
+ root.destroy() # pyflakes falsely sees root as undefined
del root