summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorRoger Serwy <roger.serwy@gmail.com>2013-04-07 17:17:17 (GMT)
committerRoger Serwy <roger.serwy@gmail.com>2013-04-07 17:17:17 (GMT)
commit4687cf795c4011f7e8a0ccdffaafba5758f1a61f (patch)
treefde18ceef5f9d302b59cf7cafab65133864184dc /Lib/idlelib/EditorWindow.py
parent299978dfe387ad543706754fa5601297408240c2 (diff)
parent6b2918ae7516d8efe306f59a636601a3d3bb6f1a (diff)
downloadcpython-4687cf795c4011f7e8a0ccdffaafba5758f1a61f.zip
cpython-4687cf795c4011f7e8a0ccdffaafba5758f1a61f.tar.gz
cpython-4687cf795c4011f7e8a0ccdffaafba5758f1a61f.tar.bz2
#1207589: merge with 3.3.
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 148a1da..ac5e069 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -479,7 +479,12 @@ class EditorWindow(object):
if iswin:
self.text.config(cursor="arrow")
- for label, eventname, verify_state in self.rmenu_specs:
+ for item in self.rmenu_specs:
+ try:
+ label, eventname, verify_state = item
+ except ValueError: # see issue1207589
+ continue
+
if verify_state is None:
continue
state = getattr(self, verify_state)()
@@ -497,7 +502,8 @@ class EditorWindow(object):
def make_rmenu(self):
rmenu = Menu(self.text, tearoff=0)
- for label, eventname, _ in self.rmenu_specs:
+ for item in self.rmenu_specs:
+ label, eventname = item[0], item[1]
if label is not None:
def command(text=self.text, eventname=eventname):
text.event_generate(eventname)