summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorAndrew Bogott <abogott@wikimedia.org>2012-06-27 13:58:33 -0500
committerAndrew Bogott <abogott@wikimedia.org>2012-06-27 13:59:30 -0500
commit52c2c1e5f357867226b71e1edbaae54c0733db3f (patch)
treed959f225d174a1961ff1d7614306dc59cf332b8c /openstack
parent71cddc514ac194e2332817673ef76c099dc158cc (diff)
downloadoslo-52c2c1e5f357867226b71e1edbaae54c0733db3f.tar.gz
oslo-52c2c1e5f357867226b71e1edbaae54c0733db3f.tar.xz
oslo-52c2c1e5f357867226b71e1edbaae54c0733db3f.zip
Pass in stream as positional argument to StreamHandler.
Naming it works in python 2.7 but not in 2.6. Change-Id: I09cb0e707c428fcfb5d8e825d1acf17b00d84073
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/log.py4
1 files changed, 3 insertions, 1 deletions
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: