diff options
author | Luke Kanies <luke@madstop.com> | 2008-10-03 13:11:44 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-10-03 13:11:44 -0500 |
commit | 6bcfd9f021be13bfd3269eaa72bc289eab37a64f (patch) | |
tree | d4053041420e68113d5af14186a04727becddbb4 /lib/puppet | |
parent | 67136f111c60779a1b87b43a6b949a2357399836 (diff) | |
download | puppet-6bcfd9f021be13bfd3269eaa72bc289eab37a64f.tar.gz puppet-6bcfd9f021be13bfd3269eaa72bc289eab37a64f.tar.xz puppet-6bcfd9f021be13bfd3269eaa72bc289eab37a64f.zip |
Fixing #947 - pluginsync no longer fails poorly when no plugins exist
Note that it still fails -- it's just a more reasonable failure.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rwxr-xr-x | lib/puppet/network/handler/fileserver.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb index ff9b96f6c..da0a2befe 100755 --- a/lib/puppet/network/handler/fileserver.rb +++ b/lib/puppet/network/handler/fileserver.rb @@ -70,7 +70,9 @@ class Puppet::Network::Handler mount.debug("Describing %s for %s" % [url, client]) if client # use the mount to resolve the path for us. - metadata = Puppet::FileServing::Metadata.new(url, :path => mount.file_path(path, client), :links => links) + return "" unless full_path = mount.file_path(path, client) + + metadata = Puppet::FileServing::Metadata.new(url, :path => full_path, :links => links) return "" unless metadata.exist? @@ -710,7 +712,7 @@ class Puppet::Network::Handler end def file_path(relpath, client = nil) - mod = valid_modules.map { |m| mod_path_exists?(m, relpath, client) ? m : nil }.compact.first + return nil unless mod = valid_modules.map { |m| mod_path_exists?(m, relpath, client) ? m : nil }.compact.first mod_file_path(mod, relpath, client) end |