makrushin-evgenii commented on PR #35105:
URL: https://github.com/apache/airflow/pull/35105#issuecomment-1774071950
> This should be idone via try/finally
I don't seem to understand your proposal. Are you expecting this?
```python
remote_path, remote_file_name = os.path.split(remote_full_path)
current_path = conn.pwd()
try:
conn.cwd(remote_path)
conn.storbinary(f"STOR {remote_file_name}", input_handle, block_size)
finally:
conn.cwd(current_path)
```
> or (better) following context_manager
I can't understand what it means. Can you point to an example please?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]