From c17cb1999357d9be51b8118661a8f35569c66dd0 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Thu, 14 May 2015 16:27:02 +0200
Subject: [PATCH] abrt-action-list-dsos: do not decode not existing object
If you build a package using 'make rpm', there is no vendor param in it.
So this is the reason why the Decode method was called on None object.
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
src/plugins/abrt-action-list-dsos | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/plugins/abrt-action-list-dsos b/src/plugins/abrt-action-list-dsos
index f4a1536..a3078a5 100644
--- a/src/plugins/abrt-action-list-dsos
+++ b/src/plugins/abrt-action-list-dsos
@@ -82,10 +82,15 @@ if __name__ == "__main__":
if outname:
outfile = xopen(outname, "w")
outname = None
+
+ vendor = h[rpm.RPMTAG_VENDOR]
+ if vendor != None:
+ verdor = vendor.decode('utf-8')
+
outfile.write("%s %s (%s) %s\n" %
(path,
h[rpm.RPMTAG_NEVRA].decode('utf-8'),
- h[rpm.RPMTAG_VENDOR].decode('utf-8'),
+ verdor,
h[rpm.RPMTAG_INSTALLTIME])
)
--
2.4.1