diff options
author | Brian Curtin <brian@python.org> | 2011-11-07 20:19:46 (GMT) |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2011-11-07 20:19:46 (GMT) |
commit | ca0fbc02e9971ead5436473e15320652c1fd97c8 (patch) | |
tree | 4b54cf71920a50bceed96d6f575ed1cbf0abac17 /Lib/logging/config.py | |
parent | c1b65d1831265534cb1613d7bf0ad7643fddb795 (diff) | |
parent | ca6befb77f007ee74137bcbfc26f3fe1345bd886 (diff) | |
download | cpython-ca0fbc02e9971ead5436473e15320652c1fd97c8.zip cpython-ca0fbc02e9971ead5436473e15320652c1fd97c8.tar.gz cpython-ca0fbc02e9971ead5436473e15320652c1fd97c8.tar.bz2 |
branch merge
Diffstat (limited to 'Lib/logging/config.py')
-rw-r--r-- | Lib/logging/config.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index e183e74..5ef5c91 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -24,8 +24,8 @@ Copyright (C) 2001-2010 Vinay Sajip. All Rights Reserved. To use, simply 'import logging' and log away! """ -import sys, logging, logging.handlers, socket, struct, os, traceback, re -import types, io +import sys, logging, logging.handlers, socket, struct, traceback, re +import io try: import _thread as thread @@ -98,9 +98,6 @@ def _resolve(name): def _strip_spaces(alist): return map(lambda x: x.strip(), alist) -def _encoded(s): - return s if isinstance(s, str) else s.encode('utf-8') - def _create_formatters(cp): """Create and return formatters""" flist = cp["formatters"]["keys"] @@ -215,7 +212,7 @@ def _install_loggers(cp, handlers, disable_existing): #avoid disabling child loggers of explicitly #named loggers. With a sorted list it is easier #to find the child loggers. - existing.sort(key=_encoded) + existing.sort() #We'll keep the list of existing loggers #which are children of named loggers here... child_loggers = [] @@ -588,7 +585,7 @@ class DictConfigurator(BaseConfigurator): #avoid disabling child loggers of explicitly #named loggers. With a sorted list it is easier #to find the child loggers. - existing.sort(key=_encoded) + existing.sort() #We'll keep the list of existing loggers #which are children of named loggers here... child_loggers = [] @@ -804,7 +801,6 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT): struct.pack(">L", n), followed by the config file. Uses fileConfig() to do the grunt work. """ - import tempfile try: conn = self.connection chunk = conn.recv(4) |