From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.236.108.46 with SMTP id p34cs3015yhg; Thu, 21 Apr 2011 03:31:43 -0700 (PDT) Received: by 10.52.101.194 with SMTP id fi2mr2058877vdb.16.1303381902454; Thu, 21 Apr 2011 03:31:42 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id u5si1731240vch.49.2011.04.21.03.31.40; Thu, 21 Apr 2011 03:31:41 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 904571858376; Thu, 21 Apr 2011 06:31:40 -0400 (EDT) Received: from sam.mediasupervision.de (sam.mediasupervision.de [80.152.3.104]) by rubyforge.org (Postfix) with ESMTP id 1E722185834E for ; Thu, 21 Apr 2011 06:18:52 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by sam.mediasupervision.de (Postfix) with ESMTP id 5F1FB3A2286; Thu, 21 Apr 2011 12:18:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at sam.mediasupervision.de Received: from sam.mediasupervision.de ([127.0.0.1]) by localhost (sam.mediasupervision.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lhyBcQuvCC2o; Thu, 21 Apr 2011 12:18:52 +0200 (CEST) Received: by sam.mediasupervision.de (Postfix, from userid 1000) id 430833A2323; Thu, 21 Apr 2011 12:18:52 +0200 (CEST) From: Gregor Hoffleit To: William Morgan Date: Thu, 21 Apr 2011 12:18:52 +0200 Message-Id: <1303381090-sup-9904@sam.mediasupervision.de> User-Agent: Sup/git Cc: sup-devel Subject: [sup-devel] heliotrope: Crash with empty message.recipients X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org I noticed that heliotrope-add bangs out on message from the debian-vote list: http://lists.debian.org/debian-vote/2008/03/msg00130.html # ruby1.9.1 -Ilib ./bin/heliotrope-add -m debian-vote-2008 -d test /home/test/GIT/heliotrope/lib/heliotrope/index.rb:482:in `block in index!': undefined method `indexable_text' for nil:NilClass (NoMethodError) from /home/test/GIT/heliotrope/lib/heliotrope/index.rb:482:in `map' from /home/test/GIT/heliotrope/lib/heliotrope/index.rb:482:in `index!' from /home/test/GIT/heliotrope/lib/heliotrope/index.rb:80:in `add_message' from ./bin/heliotrope-add:113:in `
' As you can see even in the HTML representation of the message linked above: To: , debian-vote@lists.debian.org This code in line 482 of lib/heliotrope/index.rb will fail work if any recipient is empty: message.recipients.map { |x| x.indexable_text }.join(" ").downcase Sadly, I'm lacking the Ruby skills to make heliotrope cope with such pathological messages. In Python, I would fix it like this: [x.indexable_text for x in message.recipients if x] Regards, Gregor _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel