[Collab-qa-commits] r702 - wnpp-monitor

lucas at alioth.debian.org lucas at alioth.debian.org
Fri Feb 8 10:59:24 UTC 2008


Author: lucas
Date: 2008-02-08 10:59:24 +0000 (Fri, 08 Feb 2008)
New Revision: 702

Modified:
   wnpp-monitor/wnpp-monitor.rb
Log:
minor tweaks ; in production

Modified: wnpp-monitor/wnpp-monitor.rb
===================================================================
--- wnpp-monitor/wnpp-monitor.rb	2008-02-07 17:49:38 UTC (rev 701)
+++ wnpp-monitor/wnpp-monitor.rb	2008-02-08 10:59:24 UTC (rev 702)
@@ -6,7 +6,7 @@
 require 'yaml'
 require 'pp'
 
-DEBUG = true
+DEBUG = false
 
 bts = SOAP::RPC::Driver::new('http://bugs.debian.org/cgi-bin/soap.cgi', '/Debbugs/SOAP')
 bts.add_method('get_status', 'bugs')
@@ -37,6 +37,7 @@
 $tmpdir = `mktemp -d /tmp/wnppmon.XXXXXX`.chomp
 
 def write_mail(pkg, subject, body, bug)
+  File::open('wnpp-monitor.log', 'a') { |fd| fd.puts "#{Time::now} -- #{pkg} #{bug} -- #{subject}" }
   File::open($tmpdir + "/#{pkg}", 'w') do |f|
     f.puts <<-EOF
 From: WNPP Monitor <lucas at debian.org>
@@ -98,7 +99,6 @@
 
 (Dir::glob($tmpdir + '/*') - ['.', '..']).each do |m|
   pkg = `basename #{m}`.chomp
-  puts pkg
   if DEBUG
     raise "sendmail failed for #{m}!" if not system("/usr/sbin/sendmail lucas at lucas-nussbaum.net < #{m}")
   else




More information about the Collab-qa-commits mailing list