calcurse-caldav: Include command/path in the debug output

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer 2016-01-23 15:08:58 +01:00
parent c2e6b31357
commit 2f4ca3c9c8

View File

@ -86,10 +86,12 @@ def remote_query(cmd, path, additional_headers, body):
headers.update(additional_headers) headers.update(additional_headers)
if debug: if debug:
print("> " + repr(headers)) print("> %s %s" % (cmd, path))
print("> Headers: " + repr(headers))
if body: if body:
for line in body.splitlines(): for line in body.splitlines():
print("> " + line) print("> " + line)
print()
conn.request(cmd, path, headers=headers, body=body) conn.request(cmd, path, headers=headers, body=body)
@ -102,9 +104,10 @@ def remote_query(cmd, path, additional_headers, body):
body = resp.read().decode('utf-8') body = resp.read().decode('utf-8')
if debug: if debug:
print("< " + repr(headers)) print("< Headers: " + repr(headers))
for line in body.splitlines(): for line in body.splitlines():
print("< " + line) print("< " + line)
print()
return (headers, body) return (headers, body)