diff --git a/tconfpy.py b/tconfpy.py index df0c643..09a5f73 100755 --- a/tconfpy.py +++ b/tconfpy.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "tconfpy" -RCSID = "$Id: tconfpy.py,v 1.144 2004/03/25 05:34:58 tundra Exp $" +RCSID = "$Id: tconfpy.py,v 1.145 2004/03/25 06:21:11 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -242,11 +242,11 @@ Messages["eIFEXTRATXT"] = FILENUM + "Extra Text On Line. '%s' Only Accepts Variable References As Arguments" Messages["eVARREADONLY"] = FILENUM + "Variable '%s' Is Read-Only. Cannot Change Its Value" Messages["eRESERVED"] = FILENUM + "Cannot Modify Value Of Reserved Symbol '%s'" -Messages["eSTRINGLONG"] = FILENUM + "Right-Hand-Side, '%s' Longer Than Max Allowed Length, %d" -Messages["eSTRINGSHORT"] = FILENUM + "Right-Hand-Side, '%s' Shorter Than Min Allowed Length, %d" +Messages["eSTRINGLONG"] = FILENUM + "Right-Hand-Side, '%s' Longer Than Max Allowed Length, %s" +Messages["eSTRINGSHORT"] = FILENUM + "Right-Hand-Side, '%s' Shorter Than Min Allowed Length, %s" Messages["eTYPEBAD"] = FILENUM + "Type Mismatch. '%s' Must Be Assigned Values Of Type %s Only" -Messages["eVALSMALL"] = FILENUM + "%d Is Smaller Than The Minimum Allowed, %f" -Messages["eVALLARGE"] = FILENUM + "%d Is Larger Than The Maximum Allowed, %f" +Messages["eVALSMALL"] = FILENUM + "%s Is Smaller Than The Minimum Allowed, %s" +Messages["eVALLARGE"] = FILENUM + "%s Is Larger Than The Maximum Allowed, %s" Messages["eVARUNDEF"] = FILENUM + "Attempt To Reference Undefined Variable '%s'" @@ -950,25 +950,25 @@ # Check bounds for interger and floats - if typ in (TYPE_FLOAT, TYPE_INT): + if update and typ in (TYPE_FLOAT, TYPE_INT): - if low and r < low: + if low != None and r < low: ErrorMsg("eVALSMALL", (cfgfile, linenum, r, low)) update = False - if up and r > up: + if up != None and r > up: ErrorMsg("eVALLARGE", (cfgfile, linenum, r, up)) update = False # Check bounds for strings - these are min/max string lengths, if present - if typ == TYPE_STRING: + if update and typ == TYPE_STRING: - if low and len(r) < low: + if low != None and len(r) < low: ErrorMsg("eSTRINGSHORT", (cfgfile, linenum, r, low)) update = False - if up and len(r) > up: + if up != None and len(r) > up: ErrorMsg("eSTRINGLONG", (cfgfile, linenum, r, up)) update = False