Branched to the 2.x release because the API is no longer backward compatible.
Changed template semantics so that 'templatevar=' causes the variable to be
instantiated with its default value.
1 parent 9925440 commit 59743f38a9c58b7d7be9932317beaff8a51ce383
@tundra tundra authored on 13 Jan 2005
Showing 1 changed file
View
7
tconfpy.py
 
# Program Information
 
PROGNAME = "tconfpy"
RCSID = "$Id: tconfpy.py,v 1.188 2005/01/13 22:08:37 tundra Exp $"
RCSID = "$Id: tconfpy.py,v 2.100 2005/01/13 22:55:58 tundra Exp $"
VERSION = RCSID.split()[2]
 
# Copyright Information
 
# Create the new variable
SymTable.Symbols[l] = SymTable.Templates.Symbols[varname]
 
# If the RHS is blank, use the default value from the template
if not r:
r = SymTable.Templates.Symbols[varname].Default
# Load the proposed value only if valid
 
if ValidateValue(l, r, cfgfile, linenum):
SymTable.Symbols[l].Value = r