Skip to content

Commit

Permalink
liberation#19 - use relative paths to connection working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahuel Angelinetti committed May 18, 2016
1 parent 879495d commit f433c04
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions carrier_pigeon/senders.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,16 @@ def _connect(self, file_path, target_url):
password=target_url.password
)

return self.client.open_sftp()
sftp = self.client.open_sftp()
sftp.chdir('.')

return sftp

def _send_file(self, file_path, target_url, row=None):
sftp = self._connect(file_path, target_url)

target_path = os.path.join(
target_url.path,
sftp.getcwd() + target_url.path,
self.get_relative_directory_for_file(file_path)
)

Expand Down

0 comments on commit f433c04

Please sign in to comment.