summaryrefslogtreecommitdiffstats
path: root/Lib/traceback.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-07-24 21:02:15 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-07-24 21:02:15 (GMT)
commit0bbfd832504565d6c2a19907424ed29bc2ff52c2 (patch)
treeaa0b65228fa9465c5c4f6e23987288170a8d73e5 /Lib/traceback.py
parentafb44f47d9a90ce85ddfb23f91bedb9e1064b035 (diff)
downloadcpython-0bbfd832504565d6c2a19907424ed29bc2ff52c2.zip
cpython-0bbfd832504565d6c2a19907424ed29bc2ff52c2.tar.gz
cpython-0bbfd832504565d6c2a19907424ed29bc2ff52c2.tar.bz2
Whitespace normalization.
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r--Lib/traceback.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index f634159..a0b5759 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -172,7 +172,7 @@ def format_exception_only(etype, value):
isinstance(etype, types.InstanceType) or
type(etype) is str):
return [_format_final_exc_line(etype, value)]
-
+
stype = etype.__name__
if not issubclass(etype, SyntaxError):
@@ -196,18 +196,18 @@ def format_exception_only(etype, value):
# only three spaces to account for offset1 == pos 0
lines.append(' %s^\n' % ''.join(caretspace))
value = msg
-
+
lines.append(_format_final_exc_line(stype, value))
return lines
def _format_final_exc_line(etype, value):
"""Return a list of a single line -- normal case for format_exception_only"""
- if value is None or not str(value):
+ if value is None or not str(value):
line = "%s\n" % etype
else:
line = "%s: %s\n" % (etype, _some_str(value))
return line
-
+
def _some_str(value):
try:
return str(value)