From e2a5c2a82976c99f3a171b8aa4c41ea08820ae31 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Tue, 17 Dec 2013 15:34:57 +1000 Subject: [PATCH] Saner debug log message generation For some reason building the debug log would include spaces in the message elements and join on the empty string. It makes much more sense to just build the list and join on the space. Change-Id: Idd82787b87518c56122d0b13551f84529306337c --- keystoneclient/session.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keystoneclient/session.py b/keystoneclient/session.py index 5382ee95a..71d7fa7bd 100644 --- a/keystoneclient/session.py +++ b/keystoneclient/session.py @@ -135,15 +135,15 @@ class Session(object): string_parts = ['curl -i'] if method: - string_parts.extend([' -X ', method]) + string_parts.extend(['-X', method]) - string_parts.extend([' ', url]) + string_parts.append(url) if headers: for header in six.iteritems(headers): - string_parts.append(' -H "%s: %s"' % header) + string_parts.append('-H "%s: %s"' % header) - _logger.debug('REQ: %s', ''.join(string_parts)) + _logger.debug('REQ: %s', ' '.join(string_parts)) data = kwargs.get('data') if data: