Add rss2email v2.24 v2.24
authorAaron Swartz <me@aaronsw.com>
Fri, 30 Jan 2004 12:01:00 +0000 (12:01 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 15 Feb 2013 16:37:52 +0000 (11:37 -0500)
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

rss2email.py

index 37c05fddd812d868182eaab17562347f3196d829..97171772a0184e847dc32e50af9c648c1f2f0035 100644 (file)
@@ -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