Make "except Exception, e" compatible with Python 3.x