Commit a8262d20 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Add output stream to astakos print methods

parent b6ce2fde
......@@ -34,7 +34,7 @@
from kamaki.cli import command
from kamaki.clients.astakos import AstakosClient
from kamaki.cli.commands import (
_command_init, errors, _optional_json, addLogSettings)
_command_init, errors, _optional_json, addLogSettings, stdout)
from kamaki.cli.command_tree import CommandTree
from kamaki.cli.errors import CLIBaseUrlError, CLIError
from kamaki.cli.utils import print_dict, ask_user
......@@ -88,8 +88,8 @@ class user_authenticate(_user_init, _optional_json):
def _print_access(r):
def _print_access(r, out=stdout):
print_dict(r['access'], out=out)
......@@ -149,9 +149,10 @@ class RequestManager(Logged):'%s %s://%s%s%s' % (
self.method, self.scheme, self.netloc, self.path, plog))
for key, val in self.headers.items():
if (not self.LOG_TOKEN) and key.lower() == 'x-auth-token':
continue' %s: %s%s' % (key, val, plog))
#if (not self.LOG_TOKEN) and key.lower() == 'x-auth-token':
# continue
show = (key.lower() != 'x-auth-token') or self.LOG_TOKEN' %s: %s%s' % (key, val if show else '', plog))
if'data size:%s%s' % (len(, plog))
if self.LOG_DATA:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment