Giampaolo Rodola' added the comment: I think "raise URLError('ftp error: %s' % reason) from reason" is just fine. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue17933> _______________________________________