[PATCH conductor 1/3] format_value is more cautious with calling .split

Jason Guiditta jguiditt at redhat.com
Thu Dec 1 14:36:52 UTC 2011


On 30/11/11 19:02 -0500, Matt Wagner wrote:
>---
> src/lib/aeolus/event/converter.rb |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/src/lib/aeolus/event/converter.rb b/src/lib/aeolus/event/converter.rb
>index b12d3b5..e082bd9 100644
>--- a/src/lib/aeolus/event/converter.rb
>+++ b/src/lib/aeolus/event/converter.rb
>@@ -30,10 +30,10 @@ module Aeolus
>       def format_value(val)
>         if val.nil?
>           val = ""
>-        elsif val.split.size > 1
>+        elsif val.respond_to?(:split) && val.split.size > 1
>           val = "\"#{val}\""
>         end
>-        return val
>+        return val.to_s
>       end
>     end
>   end
>-- 
>1.7.6.4
>

ACK to this one, I hit a similar issue just yesterday and didn't get
around to correcting it yet.  I suspect your others are fine, so feel
free to push them too, I just dont have the full setup to properly
test them right now myself.  My only concern is when tests get
commented out, they may get forgotten rather than fixed.

-j



More information about the aeolus-devel mailing list