Skip to content

Commit 185d695

Browse files
de-nordiccarlescufi
authored andcommitted
scripts: runners: Add BuildConfiguration.path attribute to class
The BuildConfiguration.path attribute has been added that stores path to .config file which has been used as source for options collected to BuildCOnfiguration object. Signed-off-by: Dominik Ermel <[email protected]>
1 parent c6ff612 commit 185d695

File tree

1 file changed

+2
-1
lines changed
  • scripts/west_commands/runners

1 file changed

+2
-1
lines changed

scripts/west_commands/runners/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class BuildConfiguration:
128128
def __init__(self, build_dir: str):
129129
self.build_dir = build_dir
130130
self.options: Dict[str, Union[str, int]] = {}
131+
self.path = os.path.join(self.build_dir, 'zephyr', '.config')
131132
self._init()
132133

133134
def __contains__(self, item):
@@ -140,7 +141,7 @@ def get(self, option, *args):
140141
return self.options.get(option, *args)
141142

142143
def _init(self):
143-
self._parse(os.path.join(self.build_dir, 'zephyr', '.config'))
144+
self._parse(self.path)
144145

145146
def _parse(self, filename: str):
146147
with open(filename, 'r') as f:

0 commit comments

Comments
 (0)