Chris Withers wrote:
Alexander Kapps wrote:
Instead you want something like:

except smtplib.SMTPException, msg
    print "eroare: " + msg

Err, that's still concatenating a string and an exception object.

OUCH! What a stupid error. Thanks for correction. :-)

What *would* work is:

except smtplib.SMTPException, msg
     print "eroare: " + str(msg)

...not that it's particularly good coding style, what with hiding the traceback and all...

Full Ack.

cheers,

Chris


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to