Skip to content

Commit

Permalink
Consistent request-response separators.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbrzt committed Jul 29, 2012
1 parent f73bfea commit edf87c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 6 additions & 1 deletion httpie/core.py
Expand Up @@ -119,7 +119,12 @@ def get_output(args, env, request, response):
with_body=OUT_RESP_BODY in args.output_options)
)

return b''.join(exchange)
output = b'\n\n\n'.join(exchange)

if env.stdout_isatty:
output += b'\n\n'

return output


def get_exist_status(code, allow_redirects=False):
Expand Down
4 changes: 0 additions & 4 deletions httpie/output.py
Expand Up @@ -79,9 +79,6 @@ def format(msg, prettifier=None, with_headers=True, with_body=True,

chunks.append(body)

if env.stdout_isatty:
chunks.append(b'\n\n')

return b''.join(chunks)


Expand Down Expand Up @@ -211,7 +208,6 @@ class OutputProcessor(object):
]

def __init__(self, env, **kwargs):
self.env = env
processors = [
cls(env, **kwargs)
for cls in self.installed_processors
Expand Down

0 comments on commit edf87c3

Please sign in to comment.