SFTP client: add missing docstrings
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
54d6c6e0f3
commit
e858cb3d71
1 changed files with 2 additions and 0 deletions
|
@ -102,10 +102,12 @@ class SFTPClient(ConfigurableObject):
|
||||||
self.initial_directory = ""
|
self.initial_directory = ""
|
||||||
|
|
||||||
def get_file(self, remote_filepath, local_filepath):
|
def get_file(self, remote_filepath, local_filepath):
|
||||||
|
""" Retrieve a file from SFTP server """
|
||||||
log.debug("Retreive file '%s' to '%s'", remote_filepath, local_filepath)
|
log.debug("Retreive file '%s' to '%s'", remote_filepath, local_filepath)
|
||||||
return self.sftp_client.get(remote_filepath, local_filepath) is None
|
return self.sftp_client.get(remote_filepath, local_filepath) is None
|
||||||
|
|
||||||
def open_file(self, remote_filepath, mode='r'):
|
def open_file(self, remote_filepath, mode='r'):
|
||||||
|
""" Remotly open a file on SFTP server """
|
||||||
log.debug("Remotly open file '%s'", remote_filepath)
|
log.debug("Remotly open file '%s'", remote_filepath)
|
||||||
return self.sftp_client.open(remote_filepath, mode=mode)
|
return self.sftp_client.open(remote_filepath, mode=mode)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue