tmda-cgi-0.13 PendList patch

Tim Rice <[email protected]>
Newsgroups gmane.mail.spam.tmda.devel
Message-ID <[email protected]>
tmda-cgi-0.13

Attached is a patch that hopefully will address errors like this
that can pop up while displaying the pending queue
....
> OSError       Python 2.3.5: /opt/bin/python
> Fri Feb 17 11:11:51 2006
[snip]
> OSError: [Errno 2] No such file or directory:
> '/home/karen/.tmda/pending/1140200159.8722.msg'
>       args = (2, 'No such file or directory')
>       errno = 2
>       filename = '/home/karen/.tmda/pending/1140200159.8722.msg'
>       strerror = 'No such file or directory'
....

-- 
Tim Rice				Multitalents	(707) 887-1469
[email protected]
tmda-cgi-0.13-PendList.patch (text/plain, 494 B)
--- tmda-cgi-0.13/PendList.py.old	2004-02-18 08:49:53.000000000 -0800
+++ tmda-cgi-0.13/PendList.py	2006-02-18 16:13:15.989700021 -0800
@@ -433,7 +433,11 @@
         continue
 
       # Message size
-      T["Size"] = CgiUtil.Size(MsgObj)
+      try:
+        T["Size"] = CgiUtil.Size(MsgObj)
+      except (IOError, OSError):
+          # in case of concurrent cleanups
+        continue
 
       # Find preferred date
       DateFormat = PVars[("PendingList", "DateFormat")]
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.