mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 17:33:08 +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)
|
||||
except tkinter.TclError:
|
||||
# activate Tkinter hook
|
||||
try:
|
||||
# may raise an error if it cannot attach to Tkinter
|
||||
from . import _imagingtk
|
||||
|
||||
try:
|
||||
|
@ -83,8 +83,6 @@ def _pyimagingtkcall(command, photo, id):
|
|||
except AttributeError:
|
||||
_imagingtk.tkinit(id(tk), 0)
|
||||
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