[PATCH 2/8] NetTestCommand: log command exception tracebacks

olichtne at redhat.com olichtne at redhat.com
Fri Jun 12 11:52:06 UTC 2015


From: Ondrej Lichtner <olichtne at redhat.com>

Exception tracebacks of commands should be logged to make problem
solving and debugging easier.

Signed-off-by: Ondrej Lichtner <olichtne at redhat.com>
---
 lnst/Common/NetTestCommand.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py
index cfa2b3b..f872a12 100644
--- a/lnst/Common/NetTestCommand.py
+++ b/lnst/Common/NetTestCommand.py
@@ -21,6 +21,7 @@ import re
 from time import time
 from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
 from lnst.Common.ConnectionHandler import recv_data, send_data
+from lnst.Common.Logs import log_exc_traceback
 
 DEFAULT_TIMEOUT = 60
 
@@ -157,6 +158,7 @@ class NetTestCommand:
         except (KeyboardInterrupt, SystemExit):
             pass
         except:
+            log_exc_traceback()
             type, value, tb = sys.exc_info()
             data = {"Exception": "%s" % value}
             self._cmd_cls.set_fail(data)
-- 
2.1.0



More information about the LNST-developers mailing list