CVS: tmda-cgi LocalConfig.py,1.4,1.5 PendList.py,1.8,1.9

Gre7g Luterman <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda-cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv3958

Modified Files:
	LocalConfig.py PendList.py 
Log Message:
Minor tweaks and bugfixes.


Index: LocalConfig.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/LocalConfig.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LocalConfig.py	3 May 2003 16:54:51 -0000	1.4
+++ LocalConfig.py	4 May 2003 19:52:46 -0000	1.5
@@ -43,16 +43,16 @@
 # Well, all symbols are really ALLOWED, but if we find any outside these sets
 # then we will reject them.  It is too risky to go messing with stuff like
 # that.
-StdSyms = ( 0, 3, 4, 12, symbol.and_expr, symbol.and_test, symbol.arith_expr, 
-  symbol.atom, symbol.comparison, symbol.expr, symbol.expr_stmt, symbol.factor, 
-  symbol.not_test, symbol.power, symbol.shift_expr, symbol.simple_stmt, 
+StdSyms = ( 0, 3, 4, 12, symbol.and_expr, symbol.and_test, symbol.arith_expr,
+  symbol.atom, symbol.comparison, symbol.expr, symbol.expr_stmt, symbol.factor,
+  symbol.not_test, symbol.power, symbol.shift_expr, symbol.simple_stmt,
   symbol.small_stmt, symbol.term, symbol.test, symbol.testlist,
   symbol.xor_expr )
 ConfigSyms = StdSyms + ( 1, 2, 7, 8, 9, 10, 11, 14, 22, 26, 27,
   symbol.dictmaker, symbol.listmaker )
-DictSyms = StdSyms + ( 1, 11, 14, 26, 27, symbol.dictmaker, 
+DictSyms = StdSyms + ( 1, 11, 14, 26, 27, symbol.dictmaker,
   symbol.file_input, symbol.stmt )
-ListSyms = StdSyms + ( 7, 8, 9, 10, symbol.file_input, symbol.listmaker, 
+ListSyms = StdSyms + ( 7, 8, 9, 10, symbol.file_input, symbol.listmaker,
   symbol.stmt )
 
 # Track the line number
@@ -60,7 +60,7 @@
 
 def Parse(ASP, AllowSym):
   """Parse an ASP statement.
-  
+
 Given one ASP statement, parse it into text, verify that it is not "dangerous",
 and set global variables to track what is assigned where."""
 
@@ -100,7 +100,7 @@
   "Set a variable to a given value."
 
   global LastLine, Assignments, Config
-  
+
   if Assignments.has_key(Var):
     Line = Assignments[Var]
   else:
@@ -143,6 +143,7 @@
 
     # Extract any comments & blank lines
     Config = {}
+    LastLine = 1
     for LastLine in range(len(FileContents)):
       if CommentSearch.search(FileContents[LastLine]):
         Config[LastLine + 1] = FileContents[LastLine].strip()

Index: PendList.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/PendList.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- PendList.py	3 May 2003 16:54:51 -0000	1.8
+++ PendList.py	4 May 2003 19:52:46 -0000	1.9
@@ -220,9 +220,10 @@
         Subject = "None"
       else:
         Subject = MsgObj.msgobj["subject"]
-        if len(Subject) > PVars[("PendingList", "CropSubject")]:
+        if len(Subject) > int(PVars[("PendingList", "CropSubject")]):
           Subject = \
-            cgi.escape(Subject[:PVars[("PendingList", "CropSubject")] - 1]) + "&#8230;"
+            cgi.escape(Subject[:int(PVars[("PendingList", "CropSubject")])
+              - 1]) + "&#8230;"
         else:
           Subject = cgi.escape(Subject)
       T["Subject"] = Subject

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.