summaryrefslogtreecommitdiff
path: root/Lib/idlelib/editor.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r--Lib/idlelib/editor.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py
index 838cb04b80..b969f8c493 100644
--- a/Lib/idlelib/editor.py
+++ b/Lib/idlelib/editor.py
@@ -1061,10 +1061,13 @@ class EditorWindow(object):
return self.io.maybesave()
def close(self):
- reply = self.maybesave()
- if str(reply) != "cancel":
- self._close()
- return reply
+ try:
+ reply = self.maybesave()
+ if str(reply) != "cancel":
+ self._close()
+ return reply
+ except AttributeError: # bpo-35379: close called twice
+ pass
def _close(self):
if self.io.filename: