Tue, Sep 06, 2016 at 04:11:38PM CEST, roid(a)mellanox.com wrote:
Catching Exception doesn't catch KeyboardInterrupt that should be
handled
and fill cmd_res which is being used in the finally block.
Signed-off-by: Roi Dayan <roid(a)mellanox.com>
applied, thanks
>---
> lnst/Controller/NetTestController.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/lnst/Controller/NetTestController.py
b/lnst/Controller/NetTestController.py
>index c8a58b3..a040933 100644
>--- a/lnst/Controller/NetTestController.py
>+++ b/lnst/Controller/NetTestController.py
>@@ -760,7 +760,7 @@ class NetTestController:
>
> try:
> cmd_res = machine.run_command(command)
>- except Exception as exc:
>+ except (KeyboardInterrupt, Exception) as exc:
> cmd_res = {"passed": False,
> "res_data": {"Exception": str(exc)},
> "msg": "Exception raised.",
>--
>1.8.4.3
>_______________________________________________
>LNST-developers mailing list
>lnst-developers(a)lists.fedorahosted.org
>https://lists.fedorahosted.org/admin/lists/lnst-developers@lists.fedorahosted.org