[tor-commits] [stem/master] Drop python 2 log object type workaround

atagar at torproject.org atagar at torproject.org
Sun Jan 5 21:39:28 UTC 2020


commit aa6aaa2e6f664c9fc0a3f76b9405848dc06e47be
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Jan 5 12:50:58 2020 -0800

    Drop python 2 log object type workaround
---
 stem/util/log.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/stem/util/log.py b/stem/util/log.py
index ccf6b4ae..4ef977b1 100644
--- a/stem/util/log.py
+++ b/stem/util/log.py
@@ -231,13 +231,7 @@ class LogBuffer(logging.Handler):
   """
 
   def __init__(self, runlevel, yield_records = False):
-    # TODO: At least in python 2.6 logging.Handler has a bug in that it doesn't
-    # extend object, causing our super() call to fail. When we drop python 2.6
-    # support we should switch back to using super() instead.
-    #
-    # super(LogBuffer, self).__init__(level = logging_level(runlevel))
-
-    logging.Handler.__init__(self, level = logging_level(runlevel))
+    super(LogBuffer, self).__init__(level = logging_level(runlevel))
 
     self.formatter = FORMATTER
     self._buffer = []





More information about the tor-commits mailing list