mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
testrunner: fix script when RIOTBASE is not defined
If not defined it was raising a KeyError. Use the 'get' function to handle non defined value. It did not put the value in the `default` case as it would have changed the behavior when `RIOTBASE` is defined but empty.
This commit is contained in:
parent
fc1baddef8
commit
921afa0820
5
dist/pythonlibs/testrunner/__init__.py
vendored
5
dist/pythonlibs/testrunner/__init__.py
vendored
@ -16,8 +16,9 @@ from traceback import extract_tb, print_tb
|
||||
import pexpect
|
||||
|
||||
PEXPECT_PATH = os.path.dirname(pexpect.__file__)
|
||||
RIOTBASE = os.environ['RIOTBASE'] or \
|
||||
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
|
||||
RIOTBASE = (os.environ.get('RIOTBASE') or
|
||||
os.path.abspath(os.path.join(os.path.dirname(__file__),
|
||||
"..", "..", "..")))
|
||||
|
||||
# Setting an empty 'TESTRUNNER_START_DELAY' environment variable use the
|
||||
# default value (3)
|
||||
|
Loading…
Reference in New Issue
Block a user