From mboxrd@z Thu Jan 1 00:00:00 1970 From: brenocon@gmail.com (Brendan O'Connor) Date: Mon, 29 Oct 2007 18:55:59 -0700 Subject: [sup-talk] tiny fix for sup-faked message id's crashing sup-sync Message-ID: Hello all -- After a tiny bugfix off SVN 650, I'm importing gmail imap! Very exciting! I hate it when I add a puts or logging statement and it messes up ruby's returning conventions, returning nil that clobbers something elsewhere. Glad to see it happens to other people too :) Index: lib/sup/message.rb =================================================================== --- lib/sup/message.rb (revision 650) +++ lib/sup/message.rb (working copy) @@ -62,8 +62,8 @@ if header["message-id"] sanitize_message_id header["message-id"] else + Redwood::log "faking message-id for message from #@from: #@id" "sup-faked-" + Digest::MD5.hexdigest(raw_header) - Redwood::log "faking message-id for message from #@from: #@id" end date = header["date"] ................... for reference the error was later, after the Message's id was nil: $ sup-sync ... [Mon Oct 29 17:16:12 -0700 2007] faking message-id for message from Mail Delivery Subsystem : [Mon Oct 29 17:16:12 -0700 2007] saving index and sources... [Mon Oct 29 17:16:12 -0700 2007] unlocking /Users/brendano/.sup/lock... /Users/brendano/sw/sup/lib/sup/index.rb:323:in `initialize': can't convert nil into String (TypeError) from /Users/brendano/sw/sup/lib/sup/index.rb:323:in `new' from /Users/brendano/sw/sup/lib/sup/index.rb:323:in `load_entry_for_id' from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `send' from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `method_missing' from /Users/brendano/sw/sup/lib/sup/poll.rb:149:in `add_messages_from' from /Users/brendano/sw/sup/lib/sup/imap.rb:174:in `each' from /Users/brendano/sw/sup/lib/sup/imap.rb:163:in `upto' from /Users/brendano/sw/sup/lib/sup/imap.rb:163:in `each' from /Users/brendano/sw/sup/lib/sup/util.rb:431:in `send' from /Users/brendano/sw/sup/lib/sup/util.rb:431:in `__pass' from /Users/brendano/sw/sup/lib/sup/util.rb:420:in `method_missing' from /Users/brendano/sw/sup/lib/sup/poll.rb:133:in `add_messages_from' from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `send' from /Users/brendano/sw/sup/lib/sup/util.rb:395:in `method_missing' from /Users/brendano/sw/sup/bin/sup-sync:133 from /Users/brendano/sw/sup/bin/sup-sync:128:in `each' from /Users/brendano/sw/sup/bin/sup-sync:128 Rats, that failed. You may have to do it manually.