]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Small re-factor to fact function.
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Mon, 25 Apr 2011 23:00:58 +0000 (00:00 +0100)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Mon, 25 Apr 2011 23:00:58 +0000 (00:00 +0100)
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
fact.rb

diff --git a/fact.rb b/fact.rb
index 9522293a711c8adb07c1c636fbf758dca57dcd6a..6e66ba6bbce9890e3e189e0a76c23283e3920d6b 100644 (file)
--- a/fact.rb
+++ b/fact.rb
@@ -24,14 +24,10 @@ module Puppet::Parser::Functions
     # and empty string is as closest to actual undef as you we can get
     # at this point in time ...
     #
-    result = (not result or result.empty?) ? '' : result
+    result = (result and not result.empty?) ? result : ''
 
     return result
   end
 end
 
 # vim: set ts=2 sw=2 et :
-
-notice fact('interfaces')
-notice fact('xyz')
-notice fact('')