On Wed, 2009-03-04 at 19:09 -0500, Michael DeHaan wrote:
Nicholas George wrote:
Hi,
I'm running Cobbler 1.4.2-1.el5 with Python Cheetah 2.0.1-1.el5 on Centos 5.
I'm trying to use the prescribed method for testing for variable existence within some of my snippets.
e.g #if $varname #else #end if
I think you want:
#if $getVar('varname','') != '' do something with $varname #else you can't use varname #end if
I noticed the same problem for snippets that had been previously working (not sure if it was a Cobbler upgrade that broke them but something on the system must have changed).
Replacing it with syntax similar to the above fixed the problem.
James
********************************************************************************* Important Note This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the sender immediately and delete this email. Any views expressed in this email are not necessarily the views of AXA-Tech Australia. Thank you. **********************************************************************************