8a8645
From 11869ec9290a32c028d9d2741a7466206b635f59 Mon Sep 17 00:00:00 2001
8a8645
From: Jake Daryll Obina <jake.obina@gmail.com>
8a8645
Date: Mon, 25 Jun 2018 11:52:11 +0800
8a8645
Subject: [PATCH] harvest_vmcore: Fix missing argument error during
8a8645
 delete_and_close()
8a8645
8a8645
delete_and_close() requires a directory name argument and it is being called
8a8645
without one. This argument is really not necessary though since the directory
8a8645
name is already saved in the directory object (can be queried via the directory
8a8645
object's name attribute), and it is the saved directory that is always deleted
8a8645
regardless of the argument passed in.
8a8645
8a8645
Signed-off-by: Jake Daryll Obina <jake.obina@gmail.com>
8a8645
---
8a8645
 src/hooks/abrt_harvest_vmcore.py.in | 6 ++++--
8a8645
 1 file changed, 4 insertions(+), 2 deletions(-)
8a8645
8a8645
diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
8a8645
index 7d4bba52..66c3ad37 100644
8a8645
--- a/src/hooks/abrt_harvest_vmcore.py.in
8a8645
+++ b/src/hooks/abrt_harvest_vmcore.py.in
8a8645
@@ -128,13 +128,15 @@ def create_abrtd_info(dest, uuid):
8a8645
     return dd
8a8645
 
8a8645
 
8a8645
-def delete_and_close(dd, dd_dirname):
8a8645
+def delete_and_close(dd):
8a8645
     """
8a8645
     Deletes the given dump directory and closes it.
8a8645
 
8a8645
     dd - dump directory object
8a8645
-    dd_dirname - full path to dump directory
8a8645
     """
8a8645
+    # Save the directory name as the directory object could be destroyed during
8a8645
+    # delete().
8a8645
+    dd_dirname = dd.name
8a8645
     if not dd.delete() == 0:
8a8645
         sys.stderr.write("Unable to delete '%s'\n" % (dd_dirname))
8a8645
         return
8a8645
-- 
8a8645
2.25.1
8a8645