From: Aaron Swartz Date: Fri, 30 Jan 2004 12:01:00 +0000 (+0000) Subject: Add rss2email v2.24 X-Git-Tag: v2.24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=91b0e46d75b16a20ff67943103f9beb5f7916471;p=rss2email.git Add rss2email v2.24 Possible fix for process leak. Tx Alan Danziger. Downloaded from: http://web.archive.org/web/20040416223252/http://www.aaronsw.com/2002/rss2email/rss2email-2.24.py --- diff --git a/rss2email.py b/rss2email.py index 37c05fd..9717177 100644 --- a/rss2email.py +++ b/rss2email.py @@ -12,7 +12,7 @@ Usage: python rss2email.py feedfile action [options] list delete n """ -__version__ = "2.23" +__version__ = "2.24" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004 Aaron Swartz. GNU GPL 2." ___contributors__ = ["Dean Jackson (dino@grorg.org)", @@ -38,7 +38,10 @@ TREAT_DESCRIPTION_AS_HTML = 1 QP_REQUIRED = 0 def send(fr, to, message): - os.popen2(["/usr/sbin/sendmail", to])[0].write(message) + i, o = os.popen2(["/usr/sbin/sendmail", to]) + i.write(message) + i.close(); o.close() + del i, o # def send(fr, to, message): # import smtplib