|
|
@ -44,7 +44,9 @@ class email(smtplib.SMTP):
|
|
|
|
def send(self, str):
|
|
|
|
def send(self, str):
|
|
|
|
"""Send `str' to the server."""
|
|
|
|
"""Send `str' to the server."""
|
|
|
|
if self.debuglevel > 0:
|
|
|
|
if self.debuglevel > 0:
|
|
|
|
print>> sys.stderr, 'send:', repr(str)
|
|
|
|
# from __future__ import print_function
|
|
|
|
|
|
|
|
# print('send:', repr(str), file=sys.stderr)
|
|
|
|
|
|
|
|
pass
|
|
|
|
if hasattr(self, 'sock') and self.sock:
|
|
|
|
if hasattr(self, 'sock') and self.sock:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if self.transferSize:
|
|
|
|
if self.transferSize:
|
|
|
@ -235,7 +237,7 @@ class StderrLogger(object):
|
|
|
|
def write(self, message):
|
|
|
|
def write(self, message):
|
|
|
|
if message == '\n':
|
|
|
|
if message == '\n':
|
|
|
|
self.logger.debug(self.buffer)
|
|
|
|
self.logger.debug(self.buffer)
|
|
|
|
print self.buffer
|
|
|
|
print(self.buffer)
|
|
|
|
self.buffer = ''
|
|
|
|
self.buffer = ''
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.buffer += message
|
|
|
|
self.buffer += message
|
|
|
|