From a1f64ed3c2d7942ea4b05636cd83eebf8728a183 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 18 Mar 2014 11:38:28 +0100 Subject: Python 3: Replace basestring with six.string_types --- paste/exceptions/formatter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'paste/exceptions') diff --git a/paste/exceptions/formatter.py b/paste/exceptions/formatter.py index a613479..7fa5e7d 100644 --- a/paste/exceptions/formatter.py +++ b/paste/exceptions/formatter.py @@ -8,6 +8,7 @@ Formatters for the exception data that comes from ExceptionCollector. # Use this: http://www.zope.org/Members/tino/VisualTraceback/VisualTracebackNews import cgi +import six import re from paste.util import PySourceColor @@ -76,7 +77,7 @@ class AbstractFormatter(object): lines.append(self.format_long_source( source, long_source)) etype = exc_data.exception_type - if not isinstance(etype, basestring): + if not isinstance(etype, six.string_types): etype = etype.__name__ exc_info = self.format_exception_info( etype, -- cgit v1.2.1