@@ -167,11 +167,10 @@ def reader(lnum=[lnum]):
167167
168168 exception = ['<p>%s: %s' % (strong (pydoc .html .escape (str (etype ))),
169169 pydoc .html .escape (str (evalue )))]
170- if type (evalue ) is types .InstanceType :
171- for name in dir (evalue ):
172- if name [:1 ] == '_' : continue
173- value = pydoc .html .repr (getattr (evalue , name ))
174- exception .append ('\n <br>%s%s =\n %s' % (indent , name , value ))
170+ for name in dir (evalue ):
171+ if name [:1 ] == '_' : continue
172+ value = pydoc .html .repr (getattr (evalue , name ))
173+ exception .append ('\n <br>%s%s =\n %s' % (indent , name , value ))
175174
176175 import traceback
177176 return head + '' .join (frames ) + '' .join (exception ) + '''
@@ -239,10 +238,9 @@ def reader(lnum=[lnum]):
239238 frames .append ('\n %s\n ' % '\n ' .join (rows ))
240239
241240 exception = ['%s: %s' % (str (etype ), str (evalue ))]
242- if type (evalue ) is types .InstanceType :
243- for name in dir (evalue ):
244- value = pydoc .text .repr (getattr (evalue , name ))
245- exception .append ('\n %s%s = %s' % (" " * 4 , name , value ))
241+ for name in dir (evalue ):
242+ value = pydoc .text .repr (getattr (evalue , name ))
243+ exception .append ('\n %s%s = %s' % (" " * 4 , name , value ))
246244
247245 import traceback
248246 return head + '' .join (frames ) + '' .join (exception ) + '''
0 commit comments