Skip to content
Snippets Groups Projects
Unverified Commit 921afa08 authored by cladmi's avatar cladmi Committed by Gaëtan Harter
Browse files

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.
parent fc1badde
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,9 @@ from traceback import extract_tb, print_tb ...@@ -16,8 +16,9 @@ from traceback import extract_tb, print_tb
import pexpect import pexpect
PEXPECT_PATH = os.path.dirname(pexpect.__file__) PEXPECT_PATH = os.path.dirname(pexpect.__file__)
RIOTBASE = os.environ['RIOTBASE'] or \ RIOTBASE = (os.environ.get('RIOTBASE') or
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")) os.path.abspath(os.path.join(os.path.dirname(__file__),
"..", "..", "..")))
# Setting an empty 'TESTRUNNER_START_DELAY' environment variable use the # Setting an empty 'TESTRUNNER_START_DELAY' environment variable use the
# default value (3) # default value (3)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment