diff options
author | James Turnbull <james@lovedthanlost.net> | 2009-09-18 06:50:18 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-09-18 06:50:18 +1000 |
commit | dcf0d0d726ecec8c6180e2443b4b94b6d4ea4abf (patch) | |
tree | cfaaec4d5180e9c219922f252db59eb8d76cbb6d | |
parent | ba269f2ee083408ecb3fe92620bf7b44cac33ab4 (diff) | |
download | puppet-dcf0d0d726ecec8c6180e2443b4b94b6d4ea4abf.tar.gz puppet-dcf0d0d726ecec8c6180e2443b4b94b6d4ea4abf.tar.xz puppet-dcf0d0d726ecec8c6180e2443b4b94b6d4ea4abf.zip |
Fix #2652 - Fix SELinux syntax error
-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 = {} |