[Apt-listbugs-commits] [apt-listbugs] 05/06: fix suppression of empty tag listings in RSS

Francesco Poli frx-guest at moszumanska.debian.org
Wed Apr 15 20:35:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

frx-guest pushed a commit to branch master
in repository apt-listbugs.

commit d94c85673ab7eb9107a66bd3ae2c80b361518ca4
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Wed Apr 15 22:16:53 2015 +0200

    fix suppression of empty tag listings in RSS
    
    Bugs with no tags should not have a list item in the RSS output
    consisting of "tags:" followed by nothing.
    There was already code to avoid this, but apparently, it failed
    to work as expected.
---
 debian/changelog         | 2 ++
 lib/aptlistbugs/logic.rb | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index d6e4049..742a2ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ apt-listbugs (0.1.17) UNRELEASED; urgency=medium
   * fixed RSS output (suppressed double encoding of strings)
   * improved and internationalized RSS output
   * suppressed duplicate entries for merged bugs in RSS output
+  * fixed the suppression of empty tag listings for bugs without tags in
+    RSS output
 
  -- Francesco Poli (wintermute) <invernomuto at paranoici.org>  Sun, 04 Jan 2015 11:42:30 +0100
 
diff --git a/lib/aptlistbugs/logic.rb b/lib/aptlistbugs/logic.rb
index 09b8bea..df3cddb 100644
--- a/lib/aptlistbugs/logic.rb
+++ b/lib/aptlistbugs/logic.rb
@@ -837,7 +837,7 @@ class Viewer
             buf << "<li>" + _("package")          + ": #{bug.pkg_key}</li>\n"
             buf << "<li>" + _("severity")         + ": #{bug.severity}</li>\n"
             buf << "<li>" + _("category of bugs") + ": #{@config.statmap(bug.stat)}</li>\n"
-            buf << "<li>" + _("tags")             + ": #{bug.tags.join(',')}</li>\n" if bug.tags != nil
+            buf << "<li>" + _("tags")             + ": #{bug.tags.join(',')}</li>\n" if bug.tags.size > 0
 
             if bug.mergeids.size > 0
               buf << "<li>" + _("   Merged with:")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/apt-listbugs/apt-listbugs.git



More information about the Apt-listbugs-commits mailing list