Switched to copy.copy for initializing passed symbol and template tables.
Cleaned up returned symbol table to only pass back the documented stuff.
1 parent 9f2cbbf commit cd6c3de908b70255da88002efc287a24c116a640
@tundra tundra authored on 19 Jan 2005
Showing 1 changed file
View
39
tconfpy.py
 
# Program Information
 
PROGNAME = "tconfpy"
RCSID = "$Id: tconfpy.py,v 2.107 2005/01/19 11:08:24 tundra Exp $"
RCSID = "$Id: tconfpy.py,v 2.108 2005/01/19 23:03:25 tundra Exp $"
VERSION = RCSID.split()[2]
 
# Copyright Information
 
# Everything was fine
else:
# Load the symbol table
SymTable.Symbols = copy.copy(InitialSymTable.Symbols)
 
# Load the template table
SymTable.Templates.Symbols = copy.copy(Templates.Symbols)
for sym in InitialSymTable.Symbols:
SymTable.Symbols[sym] = InitialSymTable.Symbols[sym]
 
# Load the template table
 
for sym in Templates.Symbols:
SymTable.Templates.Symbols[sym] = Templates.Symbols[sym]
 
# Initialize the globals
 
SymTable.ALLOWNEWVAR = AllowNewVars
for sym in Predefined:
del SymTable.Symbols[sym]
 
 
return SymTable
# Now populate a return symbol table containing only the stuff we
# actually want
retval = SymbolTable()
 
retval.Symbols = copy.copy(SymTable.Symbols)
retval.DebugMsgs = copy.copy(SymTable.DebugMsgs)
retval.ErrMsgs = copy.copy(SymTable.ErrMsgs)
retval.WarnMsgs = copy.copy(SymTable.WarnMsgs)
retval.LiteralLines = copy.copy(SymTable.LiteralLines)
 
return retval
 
 
# End of 'ParseConfig()'