Skip to content

Commit 72e2fc9

Browse files
author
atollk
committed
In fs.ftpfs.FTPFS.upload, replaced self._manage_ftp by self.ftp.
See issue 455 for a detailed discussion.
1 parent 64d7a52 commit 72e2fc9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/ftpfs.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -814,11 +814,10 @@ def upload(self, path, file, chunk_size=None, **options):
814814
# type: (Text, BinaryIO, Optional[int], **Any) -> None
815815
_path = self.validatepath(path)
816816
with self._lock:
817-
with self._manage_ftp() as ftp:
818-
with ftp_errors(self, path):
819-
ftp.storbinary(
820-
str("STOR ") + _encode(_path, self.ftp.encoding), file
821-
)
817+
with ftp_errors(self, path):
818+
self.ftp.storbinary(
819+
str("STOR ") + _encode(_path, self.ftp.encoding), file
820+
)
822821

823822
def writebytes(self, path, contents):
824823
# type: (Text, ByteString) -> None

0 commit comments

Comments
 (0)