summaryrefslogtreecommitdiff
path: root/mail/rss2email/patches/patch-ad
blob: 5bb777e7b6c2c2e4d2beb2e9d34af8fb33baf37d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-ad,v 1.4 2007/01/19 00:57:03 schmonz Exp $

--- rss2email.py.orig	2007-01-18 18:27:17.000000000 -0500
+++ rss2email.py
@@ -182,6 +182,11 @@ def send(sender, recipient, subject, bod
 		i, o = os.popen2(["/usr/sbin/sendmail", recipient])
 		i.write(msg_as_string)
 		i.close(); o.close()
+		pid, status = os.wait()
+		if status != 0:
+			print >>warn, ""
+			print >>warn, ('Fatal error: sendmail exited with code %s' % status)
+			sys.exit(1)
 		del i, o
 		return None
 
@@ -212,8 +217,7 @@ import cPickle as pickle, md5, time, os,
 unix = 0
 try:
 	import fcntl
-	if sys.version.find('sunos') != -1:
-		unix = 1
+	unix = 1
 except:
 	pass
 		
@@ -225,6 +229,7 @@ import mimify; from StringIO import Stri
 import feedparser
 feedparser.USER_AGENT = "rss2email/"+__version__+ " +http://www.aaronsw.com/2002/rss2email/"
 
+sys.path.append("@LOCALBASE@/share/html2text")
 import html2text as h2t
 
 h2t.UNICODE_SNOB = UNICODE_SNOB