From 7a7f05ec9edcbb0abc58bda587726600667130f0 Mon Sep 17 00:00:00 2001 From: Mathias Petermann Date: Wed, 11 Nov 2020 08:05:37 +0100 Subject: [PATCH] Fix comments in sftp delete_files --- lemur/plugins/lemur_sftp/plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lemur/plugins/lemur_sftp/plugin.py b/lemur/plugins/lemur_sftp/plugin.py index f0a63b70..304271ab 100644 --- a/lemur/plugins/lemur_sftp/plugin.py +++ b/lemur/plugins/lemur_sftp/plugin.py @@ -145,7 +145,7 @@ class SFTPDestinationPlugin(DestinationPlugin): 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): host = self.get_option("host", options) @@ -155,7 +155,7 @@ class SFTPDestinationPlugin(DestinationPlugin): ssh_priv_key = self.get_option("privateKeyPath", options) ssh_priv_key_pass = self.get_option("privateKeyPass", options) - # upload files + # delete files try: current_app.logger.debug( "Connecting to {0}@{1}:{2}".format(user, host, port) @@ -184,8 +184,8 @@ class SFTPDestinationPlugin(DestinationPlugin): # open the sftp session inside the ssh connection sftp = ssh.open_sftp() - # upload certificate files to the sftp destination - for filename, data in files.items(): + # delete files + for filename, _ in files.items(): current_app.logger.debug( "Deleting {0} from {1}".format(filename, dst_path) )