diff options
| author | Max Martin <max@puppetlabs.com> | 2011-03-30 13:00:56 -0700 |
|---|---|---|
| committer | Max Martin <max@puppetlabs.com> | 2011-03-30 13:00:56 -0700 |
| commit | 9d17809e5b240aa80d2c30f4d9625d4812802b8f (patch) | |
| tree | f2c9101dbf36c9fcbf51454c9baca9a7d92cb667 /lib/puppet/parser | |
| parent | 76b3ee6822f52b100c45cd8921f13739f12ddf38 (diff) | |
| parent | f5170fc2dbcbb4202b9b08e8944aa35f7a7bf7b8 (diff) | |
| download | puppet-9d17809e5b240aa80d2c30f4d9625d4812802b8f.tar.gz puppet-9d17809e5b240aa80d2c30f4d9625d4812802b8f.tar.xz puppet-9d17809e5b240aa80d2c30f4d9625d4812802b8f.zip | |
Merge branch '2.6.next' into 2.6.x
* 2.6.next: (23 commits)
(#5908) Add support for new update-rc.d disable API
(#6862) Add a default subject for the mail_patches rake task
Fixed #6256 - Creation of rrd directory.
(#5477) Allow watch_file to watch non-existent files, especially site.pp
(#5221) Add test for fix to fileset with trailing separator
(#5221) Fix fileset path absoluteness checking with trailing slash
(#4769) Fix negative timeout support for newer rubies
Fixed #6562 - Minor kick documentation fix
(#6658) Propagate ENC connection errors to the agent
(#4884) Remove typo from spec test
(#4884) Modify tests to pass on non-OS X systems
(#4884) Revise new exec tests, add a few more
(4576) - if ENC declares invalid class, it is logged at warning.
(#4884) Add an shell provider for execs
(#4884) Fix Test::Unit exec tests
(#4884) Break the exec type out to have a posix provider
(#4884) Add consistent path validation and behavior
(#4884) Add expand_path to requiring the spec_helper
(#4884) Autorequire shared behaviors and method to silence warnings
(#4884) Fix whitespace
...
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/compiler.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/parser/lexer.rb | 5 | ||||
| -rw-r--r-- | lib/puppet/parser/parser_support.rb | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/compiler.rb b/lib/puppet/parser/compiler.rb index fdabd05c9..6e8e3d26b 100644 --- a/lib/puppet/parser/compiler.rb +++ b/lib/puppet/parser/compiler.rb @@ -162,7 +162,7 @@ class Puppet::Parser::Compiler resource.evaluate unless lazy_evaluate found << name else - Puppet.info "Could not find class #{name} for #{node.name}" + Puppet.warning "Could not find class #{name} for #{node.name}" @catalog.tag(name) end end diff --git a/lib/puppet/parser/lexer.rb b/lib/puppet/parser/lexer.rb index 9a25263f6..71d9440ff 100644 --- a/lib/puppet/parser/lexer.rb +++ b/lib/puppet/parser/lexer.rb @@ -312,7 +312,8 @@ class Puppet::Parser::Lexer def file=(file) @file = file @line = 1 - @scanner = StringScanner.new(File.read(file)) + contents = File.exists?(file) ? File.read(file) : "" + @scanner = StringScanner.new(contents) end def shift_token @@ -547,7 +548,7 @@ class Puppet::Parser::Lexer value,terminator = slurpstring('"$') token_queue << [TOKENS[token_type[terminator]],preamble+value] if terminator != '$' or @scanner.scan(/\{/) - token_queue.shift + token_queue.shift elsif var_name = @scanner.scan(%r{(\w*::)*\w+|[0-9]}) token_queue << [TOKENS[:VARIABLE],var_name] tokenize_interpolated_string(DQ_continuation_token_types) diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb index 7a0aa2601..9e580efb2 100644 --- a/lib/puppet/parser/parser_support.rb +++ b/lib/puppet/parser/parser_support.rb @@ -88,7 +88,6 @@ class Puppet::Parser::Parser unless file =~ /\.pp$/ file = file + ".pp" end - raise Puppet::Error, "Could not find file #{file}" unless FileTest.exist?(file) end raise Puppet::AlreadyImportedError, "Import loop detected" if known_resource_types.watching_file?(file) |
