We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5548d69 commit 62bbd0cCopy full SHA for 62bbd0c
labgridhelper/barebox.py
@@ -1,5 +1,5 @@
1
from labgrid.driver import BareboxDriver
2
-
+from labgridhelper.dictionary_functions import split_output_to_dict
3
4
def get_commands(command):
5
"""Returns the available commands of a running Barebox bootloader
@@ -25,12 +25,4 @@ def get_globals(command):
25
dict: name as key and value as key-value
26
"""
27
assert isinstance(command, BareboxDriver)
28
- out = command.run_check("global")
29
- out = map(lambda x: x[2:], out)
30
- global_variables = {}
31
- for line in out:
32
- sep = line.index(":")
33
- key = line[:sep]
34
- value = line[sep+2:]
35
- global_variables[key] = value
36
- return global_variables
+ return split_output_to_dict(command, "global", delimiter=":", strip_chars="* ")
0 commit comments