>
> What follows is the exception handling snippet:
> ## ------------------------------------------------------------------
> except ftplib.error_perm, e:
>    msg = "Couldn't get %s ---- %s" % (fname,str(sys.exc_info()[1]))
>        log.add(msg)
>        more-code-follows
> ## ------------------------------------------------------------------
> When the code above is successful, the application simply
> logs the exception and continues.
> When the code above fails the traceback is as follows:
>

Are you sure you aren't doing anything with the ftp object in the
"more code follows"?
You are probably creating another error of the same type while
processing your exception, so the second one doesn't get caught.

like this (except with ftp obviously):
try:
    f = open('in.txt')
except IOError:
    y = open('log.txt', 'w')
    y.write('failed!')
    y.close()
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to