diff roundup/configuration.py @ 5424:fd0481aa17b8

Python 3 preparation: avoid logging._levelNames. logging._levelNames is an internal name, not a public interface, and is not available in current Python 3. Fortunately, logger.setLevel accepts strings for log levels, not just numeric levels, in 2.7 (although that change is not mentioned in the 2.7 documentation).
author Joseph Myers <jsm@polyomino.org.uk>
date Wed, 25 Jul 2018 09:31:50 +0000
parents 56c9bcdea47f
children b7fa56ced601
line wrap: on
line diff
--- a/roundup/configuration.py	Wed Jul 25 09:30:41 2018 +0000
+++ b/roundup/configuration.py	Wed Jul 25 09:31:50 2018 +0000
@@ -1625,7 +1625,7 @@
             h.close()
             logger.removeHandler(hdlr)
         logger.handlers = [hdlr]
-        logger.setLevel(logging._levelNames[self["LOGGING_LEVEL"] or "ERROR"])
+        logger.setLevel(self["LOGGING_LEVEL"] or "ERROR")
 
     def load(self, home_dir):
         """Load configuration from path designated by home_dir argument"""

Roundup Issue Tracker: http://roundup-tracker.org/