[PATCH][Autotest] Add explain to unpickle error in parallel module.

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

 



Signed-off-by: Jiří Župka <jzupka@xxxxxxxxxx>
---
 client/bin/parallel.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/client/bin/parallel.py b/client/bin/parallel.py
index cb02082..78a02c9 100644
--- a/client/bin/parallel.py
+++ b/client/bin/parallel.py
@@ -56,7 +56,12 @@ def fork_start(tmp, l):
 def _check_for_subprocess_exception(temp_dir, pid):
     ename = temp_dir + "/debug/error-%d" % pid
     if os.path.exists(ename):
-        e = pickle.load(file(ename, 'r'))
+        try:
+            e = pickle.load(file(ename, 'r'))
+        except ImportError:
+            logging.error("Unknown exception to unpickle. Exception must be"
+                          " defined in error module.")
+            raise
         # rename the error-pid file so that they do not affect later child
         # processes that use recycled pids.
         i = 0
-- 
1.7.7.3

--
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