diff options
Diffstat (limited to 'lib/puppet/util')
-rw-r--r-- | 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 348eab7e9..bdf44152b 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 = {} |