Signed-off-by: James Turnbull <[email protected]>
---
lib/puppet/util/selinux.rb | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb
index 348eab7..bdf4415 100644
--- a/lib/puppet/util/selinux.rb
+++ b/lib/puppet/util/selinux.rb
@@ -159,18 +159,17 @@ module Puppet::Util::SELinux
# a linux kernel bug. See ticket #1963 for details.
mountfh = File.open("/proc/mounts")
mounts += mountfh.read_nonblock(1024) while true
- end
else
# Otherwise we shell out and let cat do it for us
mountfh = IO.popen("/bin/cat /proc/mounts")
mounts = mountfh.read
end
- ensure
- mountfh.close
rescue EOFError
# that's expected
rescue
return nil
+ ensure
+ mountfh.close
end
mntpoint = {}
--
1.6.0.6
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---