[Pkg-puppet-devel] [facter] 269/352: (maint) zoneadm_output should always be a string

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 01b8f2da14f303aa9ac04dc8e636a0bdea81940f
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Fri Feb 14 13:45:33 2014 -0800

    (maint) zoneadm_output should always be a string
---
 lib/facter/util/solaris_zones.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/facter/util/solaris_zones.rb b/lib/facter/util/solaris_zones.rb
index 881baa7..e6b287d 100644
--- a/lib/facter/util/solaris_zones.rb
+++ b/lib/facter/util/solaris_zones.rb
@@ -103,11 +103,11 @@ module Util
     #
     # @api private
     def parse!
-      if @zoneadm_output
-        rows = @zoneadm_output.split("\n").collect { |line| line.split(':') }
-      else
+      if @zoneadm_output.empty?
         Facter.debug "Cannot parse zone facts, #{zoneadm_cmd} returned no output"
         rows = []
+      else
+        rows = @zoneadm_output.split("\n").collect { |line| line.split(':') }
       end
 
       @zone_hash = rows.inject({}) do |memo, fields|

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list