Issue #3773 has been updated by Markus Roberts.

Status changed from Re-opened to Needs more information

Perhaps I'm not seeing things the way you are.

It wanted one argument, you didn't give it any, and it told you so.  It seems 
reasonably clear to me, and consistent with how erb works in every other 
context (e.g. rails).

What sort of error message would you think would be clearer, keeping in mind 
that we can't tell what the user is doing, so it has to make as much sense in 
the more common case of a user *intentionally* calling a method (but passing 
the wrong number of arguments) as it does in the case of a user *accidentally* 
calling a method?

-- Markus


----------------------------------------
Bug #3773: Can't use "timeout" as a variable name in an erb template
http://projects.puppetlabs.com/issues/3773

Author: Robin Bowes
Status: Needs more information
Priority: Normal
Assigned to: 
Category: 
Target version: 
Affected version: 0.25.4
Keywords: template erb
Branch: 


I got this error when puppet tried to parse a template:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed 
to parse template pulse/lvs.cf.virtual.erb: wrong number of arguments (0 for 1) 
at /etc/puppet/modules/pulse/manifests/config.pp:121 on node 
a003.private.a.statcounter.com

I debugged the content of the template until I found that a template containing 
this single line caused the same error:

timeout = <%= timeout %>

I worked around this by changing the variable name to timeout_value:

timeout = <%= timeout_value %>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to