[Pkg-puppet-devel] Bug#513314: comparison of Fixnum with String failed

Matthew Palmer mpalmer at debian.org
Wed Jan 28 06:01:42 UTC 2009


On Wed, Jan 28, 2009 at 02:32:30PM +1100, Jayen Ashar wrote:
> Package: puppetmaster
> Version: 0.24.6-1
> Severity: normal
> 
> the puppet classifer spits out this as part of its yaml:
> ---
> classes:
>   - debian_etch
> parameters:
>   stage: 0
> 
> the manifest contains:
>   if $stage <= 0 {
> 
> the error message i get is:
> err: Could not retrieve catalog: comparison of Fixnum with String failed at /etc/puppet/manifests/classes/debian_etch.pp:16 on node matht403.maths.unsw.edu.au
> 
> I also tried '$stage <= "0"', but got the same error.  Any way I can
> force both to be Fixnums?  Or both to be Strings?

Run with --trace to get a backtrace of the problem, then you can possibly
use either .to_i or .to_s at the appropriate line in the code to cast the
value to whatever you want for your comparison.  Based on this and your
other bug, I'd say that there's some really frightening stuff, type-wise,
going on in the code related to inequality operators.

- Matt





More information about the Pkg-puppet-devel mailing list