diff options
| author | Markus Roberts <Markus@reality.com> | 2010-07-15 19:44:35 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-07-18 19:44:15 -0700 |
| commit | 8c8c1469ae9f1dd11c567d89a27be81653ca2052 (patch) | |
| tree | d87c89e15e0b390115a53961509a54006344c0d7 /lib/puppet/parser/parser_support.rb | |
| parent | d319da41e46f0f3621180d09d3110f67003a7527 (diff) | |
| download | puppet-8c8c1469ae9f1dd11c567d89a27be81653ca2052.tar.gz puppet-8c8c1469ae9f1dd11c567d89a27be81653ca2052.tar.xz puppet-8c8c1469ae9f1dd11c567d89a27be81653ca2052.zip | |
Minimal fix for #4243 -- import isn't thread safe
The import function was calling type_loader#import directly so that it could
pass in the current file name, but by doing so it was thwarting the thread-
safety locking level. This patch rearanges things so that all imports go
through the same (thread safe) code path while retaining the current_file
passing, error handling, etc. from the old structure.
Diffstat (limited to 'lib/puppet/parser/parser_support.rb')
| -rw-r--r-- | lib/puppet/parser/parser_support.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb index 4f3a4ddff..c0fd37178 100644 --- a/lib/puppet/parser/parser_support.rb +++ b/lib/puppet/parser/parser_support.rb @@ -111,7 +111,7 @@ class Puppet::Parser::Parser end def import(file) - known_resource_types.loader.import(file, @lexer.file) + known_resource_types.loader.import_if_possible(file, @lexer.file) end def initialize(env) |
