forked from M-Labs/artiq
rpctool: use pprint in interactive mode
This commit is contained in:
parent
d0d50d74eb
commit
763a4d3011
|
@ -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():
|
||||||
|
|
Loading…
Reference in New Issue