rpctool: use pprint in interactive mode

This commit is contained in:
Sebastien Bourdeauducq 2016-03-02 11:47:34 +08:00
parent d0d50d74eb
commit 763a4d3011
1 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ def interactive(remote):
else:
return getattr(remote, k)
try:
result = eval(cmd, {}, RemoteDict())
ret = eval(cmd, {}, RemoteDict())
except Exception as e:
if isinstance(e, RemoteError):
print("Remote exception:")
@ -107,8 +107,8 @@ def interactive(remote):
else:
traceback.print_exc()
else:
if result is not None:
print(result)
if ret is not None:
pprint.pprint(ret)
def main():