I'm reading this script. It synchronizes files via FTP.
I'm confused with this statement in line 106
try:
...
except error_perm, msg:
...
It seems the variables error_perm and msg come from nowhere. When the try part goes wrong, the script halts and fails to go into the except part.
You have the next import on the top of the file:
from ftplib import FTP, error_perm
error_perm is an error class.
statement
except error_perm, msg:
catches any exception with type error_perm and stores exception object in variable msg.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With