diff mercurial/mail.py @ 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 19d489404d79
children 601c1e226889
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,