Fix comments in sftp delete_files

This commit is contained in:
Mathias Petermann 2020-11-11 08:05:37 +01:00
parent 31b5f3df86
commit 7a7f05ec9e

View File

@ -145,7 +145,7 @@ class SFTPDestinationPlugin(DestinationPlugin):
self.delete_file(dst_path, files, options) self.delete_file(dst_path, files, options)
# here the file is uploaded for real, this helps to keep this class DRY # here the file is deleted
def delete_file(self, dst_path, files, options): def delete_file(self, dst_path, files, options):
host = self.get_option("host", options) host = self.get_option("host", options)
@ -155,7 +155,7 @@ class SFTPDestinationPlugin(DestinationPlugin):
ssh_priv_key = self.get_option("privateKeyPath", options) ssh_priv_key = self.get_option("privateKeyPath", options)
ssh_priv_key_pass = self.get_option("privateKeyPass", options) ssh_priv_key_pass = self.get_option("privateKeyPass", options)
# upload files # delete files
try: try:
current_app.logger.debug( current_app.logger.debug(
"Connecting to {0}@{1}:{2}".format(user, host, port) "Connecting to {0}@{1}:{2}".format(user, host, port)
@ -184,8 +184,8 @@ class SFTPDestinationPlugin(DestinationPlugin):
# open the sftp session inside the ssh connection # open the sftp session inside the ssh connection
sftp = ssh.open_sftp() sftp = ssh.open_sftp()
# upload certificate files to the sftp destination # delete files
for filename, data in files.items(): for filename, _ in files.items():
current_app.logger.debug( current_app.logger.debug(
"Deleting {0} from {1}".format(filename, dst_path) "Deleting {0} from {1}".format(filename, dst_path)
) )