From d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0 Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Sat, 30 Jun 2012 02:13:05 +0800 Subject: fix bug lp:1019348,update openstack-common to support pep8 1.3. also,this patch turns off pep8 E125 check. Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf --- openstack/common/log.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'openstack/common/log.py') diff --git a/openstack/common/log.py b/openstack/common/log.py index 9e0ad7e..8a368a1 100644 --- a/openstack/common/log.py +++ b/openstack/common/log.py @@ -66,13 +66,13 @@ log_opts = [ help='prefix each line of exception output with this format'), cfg.ListOpt('default_log_levels', default=[ - 'amqplib=WARN', - 'sqlalchemy=WARN', - 'boto=WARN', - 'suds=INFO', - 'keystone=INFO', - 'eventlet.wsgi.server=WARN' - ], + 'amqplib=WARN', + 'sqlalchemy=WARN', + 'boto=WARN', + 'suds=INFO', + 'keystone=INFO', + 'eventlet.wsgi.server=WARN' + ], help='list of logger=LEVEL pairs'), cfg.BoolOpt('publish_errors', default=False, @@ -89,7 +89,7 @@ log_opts = [ default='[instance: %(uuid)s] ', help='If an instance UUID is passed with the log message, ' 'format it like this'), - ] +] generic_log_opts = [ @@ -105,7 +105,7 @@ generic_log_opts = [ cfg.StrOpt('logfile_mode', default='0644', help='Default file mode used when creating log files'), - ] +] CONF = cfg.CONF @@ -208,9 +208,9 @@ class JSONFormatter(logging.Formatter): def formatException(self, ei, strip_newlines=True): lines = traceback.format_exception(*ei) if strip_newlines: - lines = [itertools.ifilter(lambda x: x, - line.rstrip().splitlines()) - for line in lines] + lines = [itertools.ifilter( + lambda x: x, + line.rstrip().splitlines()) for line in lines] lines = list(itertools.chain(*lines)) return lines @@ -252,9 +252,9 @@ class PublishErrorsHandler(logging.Handler): CONF.list_notifier_drivers): return notifier.api.notify(None, 'error.publisher', - 'error_notification', - notifier.api.ERROR, - dict(error=record.msg)) + 'error_notification', + notifier.api.ERROR, + dict(error=record.msg)) def handle_exception(type, value, tb): -- cgit