mail: add missing import of sys
authorBryan O'Sullivan <bryano@fb.com>
Fri, 12 Apr 2013 17:17:35 -0700
changeset 18916 6edb0e18b83c
parent 18915 169030d9255e
child 18917 fafe9ca2a749
child 18919 cdf764a2f7a5
mail: add missing import of sys Found using Cython.
mercurial/mail.py
--- 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,