You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- original.py 2012-09-19 16:05:14.000000000 +0100
+++ __init__.py 2012-09-19 16:02:04.000000000 +0100
@@ -33,14 +33,14 @@
class Formatter(logging.Formatter):
def __init__(self, fmt=None, datefmt=None):
- super(Formatter, self).__init__(fmt or _DEFAULT_FMT, datefmt)
+ logging.Formatter.__init__(self, fmt or _DEFAULT_FMT, datefmt)
# A user-configurable function to convert the creation time to a tuple.
# It's used by Format.formatTime method and default is time.localtime()
# We set it to convert time to a struct_time in UTC
self.converter = time.gmtime
def formatException(self, exc_info):
- text = super(Formatter, self).formatException(exc_info)
+ text = logging.Formatter.formatException(self, exc_info)
# Prepend ! mark to every line
text = '\n'.join(('! %s' % line) for line in text.splitlines())
return text
The above patch makes logsna.Formatter work in python2.6
Because logging.Formatter is an old style class (on py26 at least) calling
super(Formatter)
[1] doesn't work.The text was updated successfully, but these errors were encountered: