comparison mercurial/mail.py @ 27619:10bed65ef209

mail: use print function We no longer use the print statement in mercurial.* \o/
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 02 Jan 2016 11:47:07 -0800
parents df31e126b706
children 8286f551b7ee
comparison
equal deleted inserted replaced
27618:5a988b3c9645 27619:10bed65ef209
3 # Copyright 2006 Matt Mackall <mpm@selenic.com> 3 # Copyright 2006 Matt Mackall <mpm@selenic.com>
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from __future__ import absolute_import 8 from __future__ import absolute_import, print_function
9 9
10 import email 10 import email
11 import os 11 import os
12 import quopri 12 import quopri
13 import smtplib 13 import smtplib
79 self.default_port = smtplib.SMTP_SSL_PORT 79 self.default_port = smtplib.SMTP_SSL_PORT
80 self._sslkwargs = sslkwargs 80 self._sslkwargs = sslkwargs
81 81
82 def _get_socket(self, host, port, timeout): 82 def _get_socket(self, host, port, timeout):
83 if self.debuglevel > 0: 83 if self.debuglevel > 0:
84 print >> sys.stderr, 'connect:', (host, port) 84 print('connect:', (host, port), file=sys.stderr)
85 new_socket = socket.create_connection((host, port), timeout) 85 new_socket = socket.create_connection((host, port), timeout)
86 new_socket = sslutil.wrapsocket(new_socket, 86 new_socket = sslutil.wrapsocket(new_socket,
87 self.keyfile, self.certfile, 87 self.keyfile, self.certfile,
88 **self._sslkwargs) 88 **self._sslkwargs)
89 self.file = smtplib.SSLFakeFile(new_socket) 89 self.file = smtplib.SSLFakeFile(new_socket)