forked from M-Labs/artiq
1
0
Fork 0

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