changeset 18916:6edb0e18b83c

mail: add missing import of sys Found using Cython.
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 12 Apr 2013 17:17:35 -0700
parents 169030d9255e
children fafe9ca2a749 cdf764a2f7a5
files mercurial/mail.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/mail.py	Fri Apr 12 17:17:05 2013 -0700
+++ b/mercurial/mail.py	Fri Apr 12 17:17:35 2013 -0700
@@ -7,7 +7,7 @@
 
 from i18n import _
 import util, encoding, sslutil
-import os, smtplib, socket, quopri, time
+import os, smtplib, socket, quopri, time, sys
 import email.Header, email.MIMEText, email.Utils
 
 _oldheaderinit = email.Header.Header.__init__
@@ -72,7 +72,7 @@
 
         def _get_socket(self, host, port, timeout):
             if self.debuglevel > 0:
-                print >> stderr, 'connect:', (host, port)
+                print >> sys.stderr, 'connect:', (host, port)
             new_socket = socket.create_connection((host, port), timeout)
             new_socket = sslutil.ssl_wrap_socket(new_socket,
                                                  self.keyfile, self.certfile,