diff options
author | Robin Houston <robin@lenny.robin> | 2011-06-21 03:19:22 +0100 |
---|---|---|
committer | Robin Houston <robin@lenny.robin> | 2011-06-21 03:19:22 +0100 |
commit | 3b29b7c3f65e0c3153fbed0d27f864aaf624a36d (patch) | |
tree | d20954ebbce516524dc3f83646cb5f46a92021a7 /app/models | |
parent | 543ee94019b124387ef775c1312e40730a0d1cdd (diff) |
Replace STDERR.puts by $stderr.puts elsewhere, which is potentially more flexible (because STDERR is always the system standard error file descriptor, whereas $stderr can be replaced by some other ruby object to handle error output).
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/exim_log.rb | 2 | ||||
-rw-r--r-- | app/models/incoming_message.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb index ab6822ebc..80535ab41 100644 --- a/app/models/exim_log.rb +++ b/app/models/exim_log.rb @@ -117,7 +117,7 @@ class EximLog < ActiveRecord::Base if !found # It's very important the envelope from is set for avoiding spam filter reasons - this # effectively acts as a check for that. - STDERR.puts("failed to find request sending Exim line for request id " + ir.id.to_s + " " + ir.url_title + " (check envelope from is being set to request address in Ruby, and load-exim-logs crontab is working)") # *** don't comment out this STDERR line, it is the point of the function! + $stderr.puts("failed to find request sending Exim line for request id " + ir.id.to_s + " " + ir.url_title + " (check envelope from is being set to request address in Ruby, and load-exim-logs crontab is working)") # *** don't comment out this STDERR line, it is the point of the function! ok = false end end diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index c2ba9c7de..938c74af0 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -1250,8 +1250,8 @@ class IncomingMessage < ActiveRecord::Base for attachment in incoming_message.get_attachments_for_display raise "internal error incoming_message " + incoming_message.id.to_s if attachment.content_type.nil? if AlaveteliFileTypes.mimetype_to_extension(attachment.content_type).nil? - STDERR.puts "Unknown type for /request/" + incoming_message.info_request.id.to_s + "#incoming-"+incoming_message.id.to_s - STDERR.puts " " + attachment.filename.to_s + " " + attachment.content_type.to_s + $stderr.puts "Unknown type for /request/" + incoming_message.info_request.id.to_s + "#incoming-"+incoming_message.id.to_s + $stderr.puts " " + attachment.filename.to_s + " " + attachment.content_type.to_s end end end |