List creation could be rewritten as a list literal
In _http_log_response method of session.py module, list "string_parts' is created as below. string_parts = ['RESP:'] string_parts.append('[%s]' % response.status_code) Could be rewritten as string_parts = [ 'RESP:', '[%s]' % response.status_code ] TrivialFix Change-Id: I83d04a71e030f3904c84cead4659c230393631db
This commit is contained in:
@@ -203,9 +203,10 @@ class Session(object):
|
||||
|
||||
text = _remove_service_catalog(response.text)
|
||||
|
||||
string_parts = ['RESP:']
|
||||
|
||||
string_parts.append('[%s]' % response.status_code)
|
||||
string_parts = [
|
||||
'RESP:',
|
||||
'[%s]' % response.status_code
|
||||
]
|
||||
for header in six.iteritems(response.headers):
|
||||
string_parts.append('%s: %s' % self._process_header(header))
|
||||
if text:
|
||||
|
Reference in New Issue
Block a user