diff options
author | Michael Stahnke <stahnma@puppetlabs.com> | 2011-08-05 09:23:49 -0700 |
---|---|---|
committer | Michael Stahnke <stahnma@puppetlabs.com> | 2011-08-05 09:23:49 -0700 |
commit | 3daea902b29cfd8e126ed64247ddf28aa5ad3d76 (patch) | |
tree | cda7fff4d06c7f3607a84b260fd71adfd9704e3b /lib/puppet/file_serving/configuration/parser.rb | |
parent | c8835ad0275c350b57884b81e485d9fc16699a21 (diff) | |
parent | 2185bb2804aeef6b419667951b2157b01404c694 (diff) | |
download | puppet-3daea902b29cfd8e126ed64247ddf28aa5ad3d76.tar.gz puppet-3daea902b29cfd8e126ed64247ddf28aa5ad3d76.tar.xz puppet-3daea902b29cfd8e126ed64247ddf28aa5ad3d76.zip |
Merge branch '2.7.x' into 2.7rc
Diffstat (limited to 'lib/puppet/file_serving/configuration/parser.rb')
-rw-r--r-- | lib/puppet/file_serving/configuration/parser.rb | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/puppet/file_serving/configuration/parser.rb b/lib/puppet/file_serving/configuration/parser.rb index 334201d37..83b75e28f 100644 --- a/lib/puppet/file_serving/configuration/parser.rb +++ b/lib/puppet/file_serving/configuration/parser.rb @@ -24,9 +24,10 @@ class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile when /^\s*$/; next # skip blank lines when /\[([-\w]+)\]/ mount = newmount($1) - when /^\s*(\w+)\s+(.+)$/ + when /^\s*(\w+)\s+(.+?)(\s*#.*)?$/ var = $1 value = $2 + value.strip! raise(ArgumentError, "Fileserver configuration file does not use '=' as a separator") if value =~ /^=/ case var when "path" @@ -58,12 +59,8 @@ class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile begin mount.info "allowing #{val} access" mount.allow(val) - rescue AuthStoreError => detail - - raise ArgumentError.new( - detail.to_s, - - @count, file) + rescue Puppet::AuthStoreError => detail + raise ArgumentError.new(detail.to_s, @count, file) end } end @@ -75,12 +72,8 @@ class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile begin mount.info "denying #{val} access" mount.deny(val) - rescue AuthStoreError => detail - - raise ArgumentError.new( - detail.to_s, - - @count, file) + rescue Puppet::AuthStoreError => detail + raise ArgumentError.new(detail.to_s, @count, file) end } end |