[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Dropping log inference from conf util



commit 314804dfce5069a13f07b79e5640e2e1b57e924f
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Nov 19 22:05:52 2011 -0800

    Dropping log inference from conf util
    
    The config's get method inference for logging runlevels no longer makes sense
    since the log util has been removed. Dropping this inference entirely rather
    than trying to make it work with logging - those config options have always
    been unused anyway.
---
 stem/util/conf.py |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/stem/util/conf.py b/stem/util/conf.py
index 7ba2f11..799d81c 100644
--- a/stem/util/conf.py
+++ b/stem/util/conf.py
@@ -273,11 +273,6 @@ class Config():
       * values are split into key/value pairs on "=>" with extra whitespace
         stripped
     
-    - key starts with "log." => stem.util.log.Runlevel
-      * values are case insensitive
-      * 'none' values are mapped to None
-      * provides the default if the value isn't a runlevel or 'none'
-    
     Arguments:
       key (str)        - config setting to be fetched
       default (object) - value provided if no such key exists or fails to be
@@ -324,14 +319,6 @@ class Config():
           msg = "Ignoring invalid %s config entry (expected a mapping, but \"%s\" was missing \"=>\")" % (key, entry)
           LOGGER.info(msg)
       val = valMap
-    elif key.startswith("log."):
-      if val.upper() == "NONE": val = None
-      elif val.upper() in log.Runlevel.values(): val = val.upper()
-      else:
-        msg = "Config entry '%s' is expected to be a runlevel" % key
-        if default != None: msg += ", defaulting to '%s'" % default
-        LOGGER.info(msg)
-        val = default
     
     return val
   



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits