From be52a5efef83babe6ed841f3eba052fa3b4e0945 Mon Sep 17 00:00:00 2001 From: termie Date: Wed, 11 Jan 2012 16:09:44 -0800 Subject: strip newlines --- keystone/backends/templated.py | 2 +- keystone/wsgi.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keystone/backends/templated.py b/keystone/backends/templated.py index f480459e..989ee0f6 100644 --- a/keystone/backends/templated.py +++ b/keystone/backends/templated.py @@ -50,7 +50,7 @@ class TemplatedCatalog(kvs.KvsCatalog): if ' = ' not in line: continue - k, v = line.split(' = ') + k, v = line.strip().split(' = ') if not k.startswith('catalog.'): continue diff --git a/keystone/wsgi.py b/keystone/wsgi.py index 401b0f01..ee14970c 100644 --- a/keystone/wsgi.py +++ b/keystone/wsgi.py @@ -246,7 +246,8 @@ class Debug(Middleware): """Iterator that prints the contents of a wrapper string.""" logging.debug('%s %s %s', ('*' * 20), 'RESPONSE BODY', ('*' * 20)) for part in app_iter: - sys.stdout.write(part) + #sys.stdout.write(part) + logging.debug(part) #sys.stdout.flush() yield part print -- cgit