From: Gregor Hoffleit <gregor@hoffleit.de>
To: William Morgan <wmorgan-heliotrope@masanjin.net>
Cc: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] heliotrope: Crash with empty message.recipients
Date: Thu, 21 Apr 2011 12:18:52 +0200 [thread overview]
Message-ID: <1303381090-sup-9904@sam.mediasupervision.de> (raw)
I noticed that heliotrope-add bangs out on message
<E1JZvDB-0000vf-17@faramir.fjphome.nl> 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 `<main>'
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
next reply other threads:[~2011-04-21 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 10:18 Gregor Hoffleit [this message]
[not found] <1303314278-sup-9272@sam.mediasupervision.de>
2011-05-10 17:45 ` William Morgan
2011-05-16 15:56 ` Gregor Hoffleit
2011-05-18 14:52 ` William Morgan
2011-05-18 15:47 ` Gregor Hoffleit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303381090-sup-9904@sam.mediasupervision.de \
--to=gregor@hoffleit.de \
--cc=sup-devel@rubyforge.org \
--cc=wmorgan-heliotrope@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox