[Apt-listbugs-commits] [apt-listbugs] 01/04: avoid repetition of list of all severities

Francesco Poli frx-guest at alioth.debian.org
Sun Sep 15 21:33:44 UTC 2013


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 821550d675e7b0c02992abcc989f4807c77fe6c2
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Sun Sep 15 22:31:05 2013 +0200

    avoid repetition of list of all severities
---
 lib/apt-listbugs/logic.rb |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 5fb45f2..1ae7a22 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -113,9 +113,10 @@ class AppConfig
   attr_reader :command, :parser, :querybts, :ignore_bugs, :system_ignore_bugs, :browser, :arrow, :xarrow
 
   def parse_options
+    all_severities = ["critical","grave","serious","important","normal","minor","wishlist"]
     if /sev_list='(.*)'/ =~ `apt-config #{@apt_conf} shell sev_list AptListbugs::Severities`
       if $1 == "all"
-        @severity = ["critical","grave","serious","important","normal","minor","wishlist"]
+        @severity = all_severities
       else
         @severity = $1.split(',')
       end
@@ -160,7 +161,7 @@ class AppConfig
         when '--severity'
           case optargs
           when "all"
-            @severity = ["critical","grave","serious","important","normal","minor","wishlist"]
+            @severity = all_severities
           else
             @severity = optargs.split(',')
           end

-- 
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