Fix a bug in traceback.format_exception_only() that led to an error
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
(backport from rev. 51995)
diff --git a/Lib/traceback.py b/Lib/traceback.py
index 75e1fcf..31b8255 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -170,7 +170,7 @@
# would throw another exception and mask the original problem.
if (isinstance(etype, BaseException) or
isinstance(etype, types.InstanceType) or
- type(etype) is str):
+ etype is None or type(etype) is str):
return [_format_final_exc_line(etype, value)]
stype = etype.__name__