Because base_context is one level higher than context, it makes sense to clear
context when base_context is changed.  This can prevent mistakes and save a
little bit of code.

Signed-off-by: Michael Goldish <[email protected]>
---
 client/common_lib/error.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index c3479bb..76ccc77 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -94,6 +94,7 @@ def base_context(s="", log=None):
     @param log: A logging function to pass the context message to.  If None, no
             function will be called.
     """
+    ctx.contexts[-1] = ""
     ctx.contexts[-2] = s
     if s and log:
         log("Context: %s" % get_context())
-- 
1.7.3.4

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to