mercredi 27 novembre 2019

In the if else statement, else block is not working in python

   if (filenames.rfind(fileName) != -1):
            sftp.chmod(sftpPath + filenames, 0644)
            print (" Permission changed successfully ")
   else:
            print (" No file available to process ")

In the above code if statement works but the else block doesnt work(its not printing if file is not available)

Aucun commentaire:

Enregistrer un commentaire