[KVM-AUTOTEST PATCH 01/26] error.py: clear context when setting base_context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mgoldish@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux