mirror of https://github.com/m-labs/artiq.git
rpctool: use pprint in interactive mode
This commit is contained in:
parent
d0d50d74eb
commit
763a4d3011
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue