summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-10-16 02:01:58 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-10-16 02:01:58 (GMT)
commit6b541de73d5d5c614322aba8148938108f17c47d (patch)
tree70dc079ba8ee1d28fb9fe872d64467006c7faf48 /Lib
parent4e334241b7675ca07f5965d9f95d4d213f886ccf (diff)
parent380ec63f23d2e76be9aec90493de174c6d01c2df (diff)
downloadcpython-6b541de73d5d5c614322aba8148938108f17c47d.zip
cpython-6b541de73d5d5c614322aba8148938108f17c47d.tar.gz
cpython-6b541de73d5d5c614322aba8148938108f17c47d.tar.bz2
Merge with 3.4 Issue#16233
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/EditorWindow.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index f43c9a1..1056552 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -689,16 +689,15 @@ class EditorWindow(object):
self.flist.open(file_path)
else:
self.io.loadfile(file_path)
+ return file_path
def open_class_browser(self, event=None):
filename = self.io.filename
- if not filename:
- tkMessageBox.showerror(
- "No filename",
- "This buffer has no associated filename",
- master=self.text)
- self.text.focus_set()
- return None
+ if not (self.__class__.__name__ == 'PyShellEditorWindow'
+ and filename):
+ filename = self.open_module()
+ if filename is None:
+ return
head, tail = os.path.split(filename)
base, ext = os.path.splitext(tail)
from idlelib import ClassBrowser