From 52c2c1e5f357867226b71e1edbaae54c0733db3f Mon Sep 17 00:00:00 2001 From: Andrew Bogott Date: Wed, 27 Jun 2012 13:58:33 -0500 Subject: Pass in stream as positional argument to StreamHandler. Naming it works in python 2.7 but not in 2.6. Change-Id: I09cb0e707c428fcfb5d8e825d1acf17b00d84073 --- openstack/common/log.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'openstack') diff --git a/openstack/common/log.py b/openstack/common/log.py index bd2724f..9d8bddf 100644 --- a/openstack/common/log.py +++ b/openstack/common/log.py @@ -327,7 +327,9 @@ def _setup_logging_from_conf(product_name): log_root.addHandler(streamlog) elif not CONF.log_file: - streamlog = logging.StreamHandler(stream=sys.stdout) + # pass sys.stdout as a positional argument + # python2.6 calls the argument strm, in 2.7 it's stream + streamlog = logging.StreamHandler(sys.stdout) log_root.addHandler(streamlog) if CONF.publish_errors: -- cgit