[kde-services-devel] r513 - trunk/commitfilter/rules
josef at new.kstuff.org
josef at new.kstuff.org
Sun Apr 19 18:16:32 CEST 2009
Author: josef
Date: 2009-04-19 18:16:31 +0200 (Sun, 19 Apr 2009)
New Revision: 513
Modified:
trunk/commitfilter/rules/commitfilter-cia
Log:
- protect against invalid rules (the Hpricot HTML parser is very lax even in XML mode, but still it likes to have something which at least remotely resembles XML...)
Modified: trunk/commitfilter/rules/commitfilter-cia
===================================================================
--- trunk/commitfilter/rules/commitfilter-cia 2009-04-19 15:57:35 UTC (rev 512)
+++ trunk/commitfilter/rules/commitfilter-cia 2009-04-19 16:16:31 UTC (rev 513)
@@ -39,7 +39,12 @@
doc = Hpricot.XML(rule)
c2e = CIA2Exim.new
- str = c2e.convert(doc)
+ begin
+ str = c2e.convert(doc)
+ rescue
+ puts "# INVALID!"
+ next
+ end
puts "if(" + str + ")"
puts "then"
puts "\tdeliver #{email} errors_to #{conf['bounceemail']}"
More information about the kde-services-devel
mailing list