forked from M-Labs/artiq
fix interactive args cancellation
This commit is contained in:
parent
13a36bf911
commit
3ed21a3b60
|
@ -350,8 +350,9 @@ class HasEnvironment:
|
|||
yield namespace
|
||||
del namespace.setattr_argument
|
||||
argdict = self.__argument_mgr.get_interactive(interactive_arglist, title)
|
||||
for key, value in argdict.items():
|
||||
setattr(namespace, key, value)
|
||||
if argdict is not None:
|
||||
for key, value in argdict.items():
|
||||
setattr(namespace, key, value)
|
||||
|
||||
def get_device_db(self):
|
||||
"""Returns the full contents of the device database."""
|
||||
|
|
|
@ -144,4 +144,4 @@ class InteractiveArgDB:
|
|||
if rid not in self.futures:
|
||||
raise ValueError("no experiment with this RID is "
|
||||
"waiting for interactive arguments")
|
||||
self.futures[rid].cancel()
|
||||
self.futures[rid].set_result(None)
|
||||
|
|
|
@ -222,8 +222,9 @@ class ArgumentManager(ProcessArgumentManager):
|
|||
arglist_desc = [(k, p.describe(), g, t)
|
||||
for k, p, g, t in interactive_arglist]
|
||||
arguments = ArgumentManager._get_interactive(arglist_desc, title)
|
||||
for key, processor, _, _ in interactive_arglist:
|
||||
arguments[key] = processor.process(arguments[key])
|
||||
if arguments is not None:
|
||||
for key, processor, _, _ in interactive_arglist:
|
||||
arguments[key] = processor.process(arguments[key])
|
||||
return arguments
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue