diff options
author | Christian Heimes <christian@cheimes.de> | 2013-07-21 01:54:15 +0200 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-07-21 01:54:15 +0200 |
commit | d74f6802523e57eb5beae58e7a146bbbb638f584 (patch) | |
tree | 5abe7f3e84962c8bf108d5ecd8e6b3337a9ce13a | |
parent | 8282d749a6353a8ffdc72f63a843cf8b12560aa1 (diff) | |
parent | 237e8f5394197253cf3bcb5c76a18577c8081fb6 (diff) | |
download | cpython-git-d74f6802523e57eb5beae58e7a146bbbb638f584.tar.gz |
merge
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index bdfeb95402..18adb84f06 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -821,7 +821,11 @@ class EditorWindow(object): 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') |