From: Lou Berger Date: Tue, 23 Jan 2018 13:10:50 +0000 (-0500) Subject: lib: ltemplate - fix handling of CallOnFail (take 2) X-Git-Tag: frr-7.1-dev~151^2~173 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8ab91133c7789960d7404c95a6c875f51c365ee4;p=mirror%2Ffrr.git lib: ltemplate - fix handling of CallOnFail (take 2) Signed-off-by: Lou Berger --- diff --git a/tests/topotests/lib/ltemplate.py b/tests/topotests/lib/ltemplate.py index e1d7750a07..c112235fc0 100644 --- a/tests/topotests/lib/ltemplate.py +++ b/tests/topotests/lib/ltemplate.py @@ -122,7 +122,9 @@ def ltemplateTest(script, SkipIfFailed=True, CallOnFail=None, CheckFuncStr=None) if check != True: pytest.skip("Check function '"+CheckFuncStr+"' returned: " + check) - luInclude(script, eval(CallOnFail)) + if CallOnFail != None: + CallOnFail = eval(CallOnFail) + luInclude(script, CallOnFail) numFail = luNumFail() - numEntry if numFail > 0: luShowFail()