mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 02:18:40 -06:00
Fix flake8
This commit is contained in:
parent
8b86e15bef
commit
ff3c2735e6
@ -128,8 +128,8 @@ class SftpImportTask(SftpTask):
|
|||||||
def run(self):
|
def run(self):
|
||||||
ssh = paramiko.SSHClient()
|
ssh = paramiko.SSHClient()
|
||||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
ssh_conn = ssh.connect(self.host, self.port,
|
ssh.connect(self.host, self.port,
|
||||||
username=self.user, password=self.pwd)
|
username=self.user, password=self.pwd)
|
||||||
ftp_conn = ssh.open_sftp()
|
ftp_conn = ssh.open_sftp()
|
||||||
path = self.path or '.'
|
path = self.path or '.'
|
||||||
files_to_process = self._get_files(ftp_conn, path)
|
files_to_process = self._get_files(ftp_conn, path)
|
||||||
@ -168,8 +168,8 @@ class SftpExportTask(SftpTask):
|
|||||||
upload_directory = path or '.'
|
upload_directory = path or '.'
|
||||||
ssh = paramiko.SSHClient()
|
ssh = paramiko.SSHClient()
|
||||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
ssh.connect(self.host, self.port,
|
ssh.connect(self.host, self.port,
|
||||||
username=self.user, password=self.pwd)
|
username=self.user, password=self.pwd)
|
||||||
ftp_conn = ssh.open_sftp()
|
ftp_conn = ssh.open_sftp()
|
||||||
target_name = self._target_name(ftp_conn,
|
target_name = self._target_name(ftp_conn,
|
||||||
upload_directory,
|
upload_directory,
|
||||||
|
Loading…
Reference in New Issue
Block a user