runners: openocd: don't throw when no config is provided

In some cases the config is already provided for us e.g. when setting
OPENOCD_NRF5_SUBFAMILY. Also it looks like config was always supposed to
be optional (there are checks for it on do_run()).

Signed-off-by: Rihards Skuja <rihardssk@mikrotik.com>
This commit is contained in:
Rihards Skuja 2020-01-10 11:48:25 +02:00 committed by Anas Nashif
commit f59b92b3ee

View file

@ -30,7 +30,7 @@ class OpenOcdBinaryRunner(ZephyrBinaryRunner):
config = default
self.openocd_config = config
if path.exists(self.openocd_config):
if self.openocd_config is not None and path.exists(self.openocd_config):
search_args = ['-s', path.dirname(self.openocd_config)]
else:
search_args = []