mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +03:00
Removed redundant try catch
This commit is contained in:
parent
c6b81d5989
commit
3114064b16
|
@ -64,7 +64,7 @@ def _pyimagingtkcall(command, photo, id):
|
||||||
tk.call(command, photo, id)
|
tk.call(command, photo, id)
|
||||||
except tkinter.TclError:
|
except tkinter.TclError:
|
||||||
# activate Tkinter hook
|
# activate Tkinter hook
|
||||||
try:
|
# may raise an error if it cannot attach to Tkinter
|
||||||
from . import _imagingtk
|
from . import _imagingtk
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -83,8 +83,6 @@ def _pyimagingtkcall(command, photo, id):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
_imagingtk.tkinit(id(tk), 0)
|
_imagingtk.tkinit(id(tk), 0)
|
||||||
tk.call(command, photo, id)
|
tk.call(command, photo, id)
|
||||||
except (ImportError, AttributeError, tkinter.TclError):
|
|
||||||
raise # configuration problem; cannot attach to Tkinter
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user