import ftplib import urllib2 import os import logging logger = logging.getLogger(\'ftpuploader\') hdlr = logging.FileHandler(\'ftplog.log\') formatter = logging.Form
There are some cases where you can use the e.message or e.messages.. But it does not work in all cases. Anyway the more safe is to use the str(e)
try: ... except Exception as e: print(e.message)