summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2011-05-02 17:04:53 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2011-05-02 17:04:53 +0200
commit7b36398a49c9318d7b15359233a3cdb86ef66c88 (patch)
tree4b8db5b036894a3384beedb57b1de41309565183
parent1d6ca552c606d296670f26e2a35ea50ec4101c72 (diff)
downloadabrt-7b36398a49c9318d7b15359233a3cdb86ef66c88.tar.gz
abrt-7b36398a49c9318d7b15359233a3cdb86ef66c88.tar.xz
abrt-7b36398a49c9318d7b15359233a3cdb86ef66c88.zip
list-dsos: don't list the same library multiple times
- + minor fix of my last commit
-rwxr-xr-xsrc/plugins/abrt-action-list-dsos.py5
1 files 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],