Skip to content

close sftp connection  #3

@paniff

Description

@paniff

I add a finally function below to colose sftp connection, not sure if it still working
except (paramiko.BadHostKeyException, paramiko.AuthenticationException) as e:
raise AuthenticationError(str(e))
except socket.timeout as e:
raise TimeoutError(str(e))
except Exception as e:
if i == max_attempts - 1:
raise SshError(str(e))
finally:
if self.client:
self.client.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions