|
|
a60cd7 |
From 530cee09dd84565552ade0bdf08b40f900bef8f1 Mon Sep 17 00:00:00 2001
|
|
|
a60cd7 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
a60cd7 |
Date: Thu, 27 Nov 2014 12:45:04 +0100
|
|
|
a60cd7 |
Subject: [PATCH] vmcore: catch IOErrors and OSErrors
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Perhaps some temporary data cleaner removed problem directory while the hook
|
|
|
a60cd7 |
was still using in.
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Resolves: rhbz#1311100
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
a60cd7 |
---
|
|
|
a60cd7 |
src/hooks/abrt_harvest_vmcore.py.in | 12 ++++++++++--
|
|
|
a60cd7 |
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
a60cd7 |
|
|
|
a60cd7 |
diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
|
|
|
a60cd7 |
index 17e2be8..c6a7e6b 100644
|
|
|
a60cd7 |
--- a/src/hooks/abrt_harvest_vmcore.py.in
|
|
|
a60cd7 |
+++ b/src/hooks/abrt_harvest_vmcore.py.in
|
|
|
a60cd7 |
@@ -272,8 +272,16 @@ def harvest_vmcore():
|
|
|
a60cd7 |
except OSError:
|
|
|
a60cd7 |
sys.stderr.write("Unable to delete '%s'. Ignoring\n" % f_full)
|
|
|
a60cd7 |
|
|
|
a60cd7 |
- # Let abrtd know what type of problem it is:
|
|
|
a60cd7 |
- create_abrtd_info(destdirnew)
|
|
|
a60cd7 |
+ try:
|
|
|
a60cd7 |
+ # Let abrtd know what type of problem it is:
|
|
|
a60cd7 |
+ create_abrtd_info(destdirnew)
|
|
|
a60cd7 |
+ except EnvironmentError as ex:
|
|
|
a60cd7 |
+ sys.stderr.write("Unable to create problem directory info: " + str(ex))
|
|
|
a60cd7 |
+ try:
|
|
|
a60cd7 |
+ shutil.rmtree(destdirnew)
|
|
|
a60cd7 |
+ except Exception as ex:
|
|
|
a60cd7 |
+ sys.stderr.write("Unable to remove incomplete problem directory: " + str(ex))
|
|
|
a60cd7 |
+ continue
|
|
|
a60cd7 |
|
|
|
a60cd7 |
# chown -R 0:0
|
|
|
a60cd7 |
change_owner_rec(destdirnew)
|
|
|
a60cd7 |
--
|
|
|
a60cd7 |
1.8.3.1
|
|
|
a60cd7 |
|