From dcf0d0d726ecec8c6180e2443b4b94b6d4ea4abf Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Fri, 18 Sep 2009 06:50:18 +1000 Subject: Fix #2652 - Fix SELinux syntax error --- lib/puppet/util/selinux.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') 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 = {} -- cgit