diff mercurial/mail.py @ 6548:962eb403165b

replace usage of os.popen() with util.popen() To make this possible, I added a mode parameter to both implementations of util.popen(), defaulting to 'r' (as it does in the Python stdlib).
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 14 Apr 2008 14:34:38 +0200
parents 75d9fe70c654
children 30e49d54c537
line wrap: on
line diff
--- a/mercurial/mail.py	Sun Apr 13 11:31:45 2008 -0500
+++ b/mercurial/mail.py	Mon Apr 14 14:34:38 2008 +0200
@@ -6,7 +6,8 @@
 # of the GNU General Public License, incorporated herein by reference.
 
 from i18n import _
-import os, smtplib, util, socket
+import os, smtplib, socket
+import util
 
 def _smtp(ui):
     '''build an smtp connection and return a function to send mail'''
@@ -53,7 +54,7 @@
     cmdline = '%s -f %s %s' % (program, util.email(sender),
                                ' '.join(map(util.email, recipients)))
     ui.note(_('sending mail: %s\n') % cmdline)
-    fp = os.popen(cmdline, 'w')
+    fp = util.popen(cmdline, 'w')
     fp.write(msg)
     ret = fp.close()
     if ret: