support list of mechsteps instead of dict
Keeping support to dictionaries so it doesn't break existing configuration files. Issuing warning so that everyone is aware.
This commit is contained in:
parent
b2ae2ded30
commit
e81801c4cb
|
|
@ -10,8 +10,13 @@ def print_pipe(x):
|
|||
def flatten(l):
|
||||
return [item for sublist in l for item in sublist]
|
||||
|
||||
|
||||
import warnings
|
||||
def key_filter(l, keyname):
|
||||
if (type(l)==list):
|
||||
return [v[keyname] for v in l]
|
||||
# Keeping support to dictionaries for backwards compatibility
|
||||
# Should be removed in the future
|
||||
warnings.warn("The use of a dictionary to describe Partial State Update Blocks will be deprecated. Use a list instead.", FutureWarning)
|
||||
return [v[keyname] for k, v in l.items()]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue