[PATCH 2/2] Do not ovewrite process information with files having same basename

Vratislav Podzimek vpodzime at redhat.com
Thu Sep 6 11:55:59 UTC 2012


e.g. 'cmdline' can be ovewritten when adding "/proc/cmdline" to the
problem data dictionary

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 meh/handler.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meh/handler.py b/meh/handler.py
index 003bf82..7958b86 100644
--- a/meh/handler.py
+++ b/meh/handler.py
@@ -221,7 +221,10 @@ class ExceptionHandler(object):
                     # would be better to use the full path here, but libreport
                     # doesn't allow '/' characters in the item name
                     filename = os.path.basename(fpath)
-                    params[filename] = fobj.read()
+                    if filename not in params:
+                        params[filename] = fobj.read()
+                    else:
+                        params[filename+"_file"] = fobj.read()
             except:
                 #skip files we cannot read
                 continue
-- 
1.7.11.4



More information about the anaconda-patches mailing list