mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
1. Catch TypeError exception when writing to OutputWindow
2. PyShell: shell isn't working due to encoding issues. Temporarily direct exceptions to the terminal. Also, trap exceptions occurring during write() instead of passing. Checking (2) in temporarily to aid finding the encoding problem in IOBinding.py
This commit is contained in:
parent
801c89be5d
commit
cbbe98f04f
2 changed files with 5 additions and 2 deletions
|
@ -40,6 +40,8 @@ class OutputWindow(EditorWindow):
|
|||
if isinstance(s, str):
|
||||
try:
|
||||
s = str(s, IOBinding.encoding)
|
||||
except TypeError:
|
||||
raise
|
||||
except UnicodeError:
|
||||
# some other encoding; let Tcl deal with it
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue