summaryrefslogtreecommitdiffstats
path: root/openstack/common
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-07-24 13:36:27 +0000
committerGerrit Code Review <review@openstack.org>2013-07-24 13:36:27 +0000
commit27bb2b6d7a78a337e64cc956947db6c7a0bb3738 (patch)
tree357e1fa1b459fecd031c3565fe0bdb6fa1dcf498 /openstack/common
parent8418dd3fba2f6f3ca4c635a26eeb61fd37d05f86 (diff)
parent3243cdfbe9bd7d7b96aa164ec58ee3bf8342eb17 (diff)
downloadoslo-27bb2b6d7a78a337e64cc956947db6c7a0bb3738.tar.gz
oslo-27bb2b6d7a78a337e64cc956947db6c7a0bb3738.tar.xz
oslo-27bb2b6d7a78a337e64cc956947db6c7a0bb3738.zip
Merge "python3: handle module moves in log"
Diffstat (limited to 'openstack/common')
-rw-r--r--openstack/common/log.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/openstack/common/log.py b/openstack/common/log.py
index 465886b..c7e729c 100644
--- a/openstack/common/log.py
+++ b/openstack/common/log.py
@@ -29,8 +29,6 @@ It also allows setting of formatting information through conf.
"""
-import ConfigParser
-import cStringIO
import inspect
import itertools
import logging
@@ -41,6 +39,7 @@ import sys
import traceback
from oslo.config import cfg
+from six import moves
from openstack.common.gettextutils import _ # noqa
from openstack.common import importutils
@@ -348,7 +347,7 @@ class LogConfigError(Exception):
def _load_log_config(log_config):
try:
logging.config.fileConfig(log_config)
- except ConfigParser.Error as exc:
+ except moves.configparser.Error as exc:
raise LogConfigError(log_config, str(exc))
@@ -521,7 +520,7 @@ class ContextFormatter(logging.Formatter):
if not record:
return logging.Formatter.formatException(self, exc_info)
- stringbuffer = cStringIO.StringIO()
+ stringbuffer = moves.StringIO()
traceback.print_exception(exc_info[0], exc_info[1], exc_info[2],
None, stringbuffer)
lines = stringbuffer.getvalue().split('\n')