Fix Curses interface for Python 2.6
In 2.6 all logging classes are not the new-style ones, so they have no mro() method and, thus, we can't use super() for them. Since CursesLogHanler is singly-inherited method, there will be no problems in usage of the explicit superclass name. Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru> Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
29ba2fc523
commit
2f88b0296a
@ -48,3 +48,5 @@ Changes
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
* Improve compatability of the curses UI with python 2.6
|
||||
|
@ -281,7 +281,7 @@ class CursesLogHandler(logging.StreamHandler):
|
||||
"""self.ui has been set to the UI class before anything is invoked"""
|
||||
|
||||
def emit(self, record):
|
||||
log_str = super(CursesLogHandler, self).format(record)
|
||||
log_str = logging.StreamHandler.format(self, record)
|
||||
color = self.ui.gettf().curses_color
|
||||
# We must acquire both locks. Otherwise, deadlock can result.
|
||||
# This can happen if one thread calls _msg (locking curses, then
|
||||
|
Loading…
Reference in New Issue
Block a user