From 7b36398a49c9318d7b15359233a3cdb86ef66c88 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Mon, 2 May 2011 17:04:53 +0200 Subject: list-dsos: don't list the same library multiple times - + minor fix of my last commit --- src/plugins/abrt-action-list-dsos.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/abrt-action-list-dsos.py b/src/plugins/abrt-action-list-dsos.py index 40cb32cc..81a99276 100755 --- a/src/plugins/abrt-action-list-dsos.py +++ b/src/plugins/abrt-action-list-dsos.py @@ -28,7 +28,8 @@ def xopen(name, mode): def parse_maps(maps_path): try: f = xopen(maps_path, "r") - return [x.strip()[x.find('/'):] for x in f.readlines() if x.find('/') > -1] + # set() -> uniqifies the list of filenames + return set([x.strip()[x.find('/'):] for x in f.readlines() if x.find('/') > -1]) except IOError, e: error_msg_and_die("Can't read '%s': %s" % (maps_path, e)) @@ -74,7 +75,7 @@ if __name__ == "__main__": if outname: outfile = xopen(outname, "w") outname = None - outfile.write("%s %s (%s) %s\n" % + outfile.write("%s %s (%s) %s\n" % (path, h[rpm.RPMTAG_NEVRA], h[rpm.RPMTAG_VENDOR], -- cgit