summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-10-10 03:13:54 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-10-10 03:13:54 (GMT)
commit365e28238f3ccde7f9024a37c212381746748d54 (patch)
treeef1d461db4f5198db80854e7fac9fc70a04cd0b1 /Lib
parent2623a5db6f0bae52e6b98a818074ff3f642b7d06 (diff)
parent4fe69ba01c39dccaee70d8ece9f2fceebd65a834 (diff)
downloadcpython-365e28238f3ccde7f9024a37c212381746748d54.zip
cpython-365e28238f3ccde7f9024a37c212381746748d54.tar.gz
cpython-365e28238f3ccde7f9024a37c212381746748d54.tar.bz2
Merge with 3.4
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/MultiCall.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/Lib/idlelib/MultiCall.py b/Lib/idlelib/MultiCall.py
index ee31f30..251a84d 100644
--- a/Lib/idlelib/MultiCall.py
+++ b/Lib/idlelib/MultiCall.py
@@ -60,8 +60,7 @@ _modifier_names = dict([(name, number)
# destroyed before .__del__ methods here are called. The following
# is used to selectively ignore shutdown exceptions to avoid
# 'Exception ignored' messages. See http://bugs.python.org/issue20167
-APPLICATION_GONE = '''\
-can't invoke "bind" command: application has been destroyed'''
+APPLICATION_GONE = "application has been destroyed"
# A binder is a class which binds functions to one type of event. It has two
# methods: bind and unbind, which get a function and a parsed sequence, as
@@ -108,9 +107,7 @@ class _SimpleBinder:
self.widget.unbind(self.widgetinst, self.sequence,
self.handlerid)
except tkinter.TclError as e:
- if e.args[0] == APPLICATION_GONE:
- pass
- else:
+ if not APPLICATION_GONE in e.args[0]:
raise
# An int in range(1 << len(_modifiers)) represents a combination of modifiers
@@ -243,9 +240,7 @@ class _ComplexBinder:
try:
self.widget.unbind(self.widgetinst, seq, id)
except tkinter.TclError as e:
- if e.args[0] == APPLICATION_GONE:
- break
- else:
+ if not APPLICATION_GONE in e.args[0]:
raise
# define the list of event types to be handled by MultiEvent. the order is
@@ -412,9 +407,7 @@ def MultiCallCreator(widget):
try:
self.__binders[triplet[1]].unbind(triplet, func)
except tkinter.TclError as e:
- if e.args[0] == APPLICATION_GONE:
- break
- else:
+ if not APPLICATION_GONE in e.args[0]:
raise
_multicall_dict[widget] = MultiCall