summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/OutputWindow.py2
-rw-r--r--Lib/idlelib/PyShell.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/idlelib/OutputWindow.py b/Lib/idlelib/OutputWindow.py
index ef155a4..4c07c03 100644
--- a/Lib/idlelib/OutputWindow.py
+++ b/Lib/idlelib/OutputWindow.py
@@ -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
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index bfd659c..18ed3aa 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -825,7 +825,7 @@ class PyShell(OutputWindow):
self.console = PseudoFile(self, "console", IOBinding.encoding)
if not use_subprocess:
sys.stdout = self.stdout
- sys.stderr = self.stderr
+### sys.stderr = self.stderr # Don't redirect exceptions, pyshell NG
sys.stdin = self
#
self.history = self.History(self.text)
@@ -1214,7 +1214,8 @@ class PyShell(OutputWindow):
OutputWindow.write(self, s, tags, "iomark")
self.text.mark_gravity("iomark", "left")
except:
- pass
+ raise ###pass # ### 11Aug07 KBK if we are expecting exceptions
+ # let's find out what they are and be specific.
if self.canceled:
self.canceled = 0
if not use_subprocess: