[Apt-listbugs-commits] [apt-listbugs] 01/01: do not crash on [Ctrl+d] (Closes: #847801)

Francesco Poli frx-guest at moszumanska.debian.org
Sat Dec 17 17:00:17 UTC 2016


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 9cbb63705bc2b69738f062bcd215546620868307
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Sat Dec 17 17:52:17 2016 +0100

    do not crash on [Ctrl+d] (Closes: #847801)
---
 debian/changelog         | 9 +++++++++
 lib/aptlistbugs/logic.rb | 6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e3ce5b2..b9bb3ae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+apt-listbugs (0.1.22) UNRELEASED; urgency=medium
+
+  * fixed "aptlistbugs/logic.rb:439:in `view': undefined method `downcase'
+    for nil:NilClass (NoMethodError)": added more robust checks for user
+    answers, in order to avoid crashing or misbehaving on [Ctrl+d]
+    (Closes: #847801)
+
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org>  Mon, 12 Dec 2016 23:59:06 +0100
+
 apt-listbugs (0.1.21) unstable; urgency=medium
 
   * fixed localization mailing list address in Norwegian translation
diff --git a/lib/aptlistbugs/logic.rb b/lib/aptlistbugs/logic.rb
index ec3726e..897c17a 100644
--- a/lib/aptlistbugs/logic.rb
+++ b/lib/aptlistbugs/logic.rb
@@ -429,6 +429,10 @@ class Viewer
             a = "n" if ! @config.yes
           end
         end
+        if a.nil?
+          a = "got nil!"
+          @config.frontend.puts ""
+        end
         if a == ""
           if hold_pkg_keys.empty?
             answer = "y"
@@ -1262,6 +1266,8 @@ class ConsoleFrontend
         return true
       elsif a == "N" || a == "n"
         return false
+      elsif a.nil?
+        $stdout.print "\n"
       end
     end
   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