[Python-checkins] cpython (merge 3.3 -> default): Issue #17532: merge from 3.3

ned.deily python-checkins at python.org
Sun Jul 21 00:09:02 CEST 2013


http://hg.python.org/cpython/rev/5643e873f06e
changeset:   84749:5643e873f06e
parent:      84746:c5d128b201af
parent:      84748:db6a22943a3f
user:        Ned Deily <nad at acm.org>
date:        Sat Jul 20 15:08:22 2013 -0700
summary:
  Issue #17532: merge from 3.3

files:
  Lib/idlelib/EditorWindow.py |  6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -821,7 +821,11 @@
                     menuEventDict[menu[0]][prepstr(item[0])[1]] = item[1]
         for menubarItem in self.menudict:
             menu = self.menudict[menubarItem]
-            end = menu.index(END) + 1
+            end = menu.index(END)
+            if end is None:
+                # Skip empty menus
+                continue
+            end += 1
             for index in range(0, end):
                 if menu.type(index) == 'command':
                     accel = menu.entrycget(index, 'accelerator')

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list