diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-04 22:25:23 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-04 22:25:23 +0000 |
| commit | c762c1960cc278f974c098ede994bb82f63fd893 (patch) | |
| tree | 568e3ce09d32176206e32e7da08af5fde87953ff /lib/puppet/util | |
| parent | 0ff7827d4d7f42fe59c10af35266f197e83b2b17 (diff) | |
| download | puppet-c762c1960cc278f974c098ede994bb82f63fd893.tar.gz puppet-c762c1960cc278f974c098ede994bb82f63fd893.tar.xz puppet-c762c1960cc278f974c098ede994bb82f63fd893.zip | |
Removing the long-obsolete Element base class. The Parameter and Type classes no longer have the same base class.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2647 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/util')
| -rw-r--r-- | lib/puppet/util/log.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/util/log_paths.rb | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb index 8c085c38e..e7e000e30 100644 --- a/lib/puppet/util/log.rb +++ b/lib/puppet/util/log.rb @@ -518,7 +518,7 @@ class Puppet::Util::Log # We can't store the actual source, we just store the path. # We can't just check for whether it responds to :path, because # plenty of providers respond to that in their normal function. - if source.is_a?(Puppet::Element) and source.respond_to?(:path) + if (source.is_a?(Puppet::Type) or source.is_a?(Puppet::Parameter)) and source.respond_to?(:path) @objectsource = true @source = source.path else diff --git a/lib/puppet/util/log_paths.rb b/lib/puppet/util/log_paths.rb new file mode 100644 index 000000000..5cfec34cb --- /dev/null +++ b/lib/puppet/util/log_paths.rb @@ -0,0 +1,16 @@ +# Created by Luke Kanies on 2007-07-04. +# Copyright (c) 2007. All rights reserved. + +module Puppet::Util::LogPaths + # return the full path to us, for logging and rollback + # some classes (e.g., FileTypeRecords) will have to override this + def path + unless defined? @path + @path = pathbuilder + end + + return "/" + @path.join("/") + end +end + +# $Id$ |
