CVS: tmda-cgi CgiUtil.py,1.12,1.13 Login.py,1.2,1.3 TODO,1.11,1.12

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-serv16556

Modified Files:
	CgiUtil.py Login.py TODO 
Log Message:
Minor tweaks.


Index: CgiUtil.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/CgiUtil.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- CgiUtil.py	3 May 2003 16:54:51 -0000	1.12
+++ CgiUtil.py	4 May 2003 20:26:25 -0000	1.13
@@ -80,7 +80,13 @@
   return "%s file <tt>%s</tt>, permissions %s" % (Desc, Filename, Perm)
 
 def TermError(Err, Cause, Failed, Other, Recommend):
-  T = Template.Template(ErrTemplate)
+  try:
+    T = Template.Template(ErrTemplate)
+  except IOError:
+    T = Template.Template(SubTemplate = ["""Error:<br>%(ErrorName)s<p>
+Cause:<br>%(Cause)s<p>
+Additional:<br>%(Additional)s<p>
+Recommend:<br>%(Recommendation)s"""])
   T["ErrorName"]  = Err
   T["Cause"]      = Cause
   T["Additional"] = """Running in %s mode.<br>

Index: Login.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/Login.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Login.py	14 Apr 2003 17:22:32 -0000	1.2
+++ Login.py	4 May 2003 20:26:25 -0000	1.3
@@ -28,7 +28,13 @@
 def Show(Msg = "", Debug = 0):
   "Show a login form in HTML."
 
-  T = Template.Template("login.html")
+  try:
+    T = Template.Template("login.html")
+  except IOError:
+    CgiUtil.TermError("Cannot access templates.", "Have Python library files "
+      "been moved from where they were unzipped?", "reading templates",
+      CgiUtil.FileDetails("default theme directory",
+      Template.Template.Dict["ThemeDir"]), "Reinstall tmda-cgi.")
   T["LoginErr"] = Msg
   T["Debug"]    = Debug
   print T

Index: TODO
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/TODO,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TODO	3 May 2003 04:58:33 -0000	1.11
+++ TODO	4 May 2003 20:26:25 -0000	1.12
@@ -1,6 +1,8 @@
 Things left to do:
 ==================
 
+    * configure -- switch from compile to configure/make/make install
+
     * FAQ -- should this be made a CGI?  Add help on adding whitelist &
              blacklist options.
 
@@ -10,10 +12,6 @@
                           include the appropriate language identifiers in the
                           viewer
 
-    * SpamCop -- an option to delete/blacklist/forward to SpamCop
-
-    * tmda-cgi dir -- catch bad tmda-cgi directory
-
-    * Tutorial -- someone should write one
+    * Tutorial -- finish section on mailing lists
 
     * URL Confirmation -- doesn't work yet for virtual users

_______________________________________
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.