]> git.notmuchmail.org Git - sup/commitdiff
whoops!
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 30 Dec 2006 05:27:15 +0000 (05:27 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 30 Dec 2006 05:27:15 +0000 (05:27 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@119 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/imap.rb
lib/sup/index.rb

index e856d99a1c48ccc031c02f822bc15fdd47952e5a..a0a7267a68f885a2608930cd09887d32ad6a463f 100644 (file)
@@ -44,7 +44,7 @@ class IMAP < Source
     BufferManager.say "Connecting to IMAP server #{host}..." do 
       ::Thread.new do
         begin
-          raise Net::IMAP::ByeResponseError, "simulated imap failure"
+          #raise Net::IMAP::ByeResponseError, "simulated imap failure"
           @imap = Net::IMAP.new host, ssl? ? 993 : 143, ssl?
           @imap.authenticate 'LOGIN', @username, @password
           @imap.examine mailbox
index 25a48df234b563ea11bf4224b19028e0bf5b48c1..fedef3ce9a9f40759248af9f2b4142d6401f5f24 100644 (file)
@@ -125,7 +125,7 @@ class Index
   end
 
   def num_results_for opts={}
-    with(@index.search(build_query(opts)).total_hits) { |x| Redwood::log "num_results_for: have #{x} for query #{query}" }
+    with(build_query(opts)) { |query| with(@index.search(query).total_hits) { |x| Redwood::log "num_results_for: have #{x} for query #{query}" } }
   end
 
   ## yield all messages in the thread containing 'm' by repeatedly