Skip to content

Commit

Permalink
Merge branch 'merinos-file-upload' into develop
Browse files Browse the repository at this point in the history
* merinos-file-upload:
  proxmoxer/backends/ssh_paramiko: improve file uplod (it was very slow)
  • Loading branch information
swayf committed Feb 12, 2017
2 parents 60f4e2c + 9671305 commit 1bba7bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions proxmoxer/backends/ssh_paramiko.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ def _exec(self, cmd):

def upload_file_obj(self, file_obj, remote_path):
sftp = self.ssh_client.open_sftp()
remote_file = sftp.open(remote_path, 'wb')
remote_file.write(file_obj.read())
remote_file.close()
sftp.putfo(file_obj, remote_path)
sftp.close()


class Backend(BaseBackend):
Expand Down

0 comments on commit 1bba7bc

Please sign in to comment.