I have a python script which downloads files from FTP. I am using ftplib for this and downloading using following statement.
ftp.retrbinary('RETR ' + file, open(path, 'wb').write)
Now the problem is, On the FTP, Someone opened an xslx file in their program and opened in write mode. When I execute my python script I am getting that xlsx file with the contents that were saved to disk on the FTP.
I am curious to know if I can alert with "File is in Write Mode or Locked on FTP".