Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Am K committed Sep 16, 2024
1 parent 8afaf75 commit 50f23d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions zcache/Storage/FTPStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def read(self, remote_file_path):
with FTP(self.host) as ftp:
ftp.login(user=self.user, passwd=self.password)
# Mendownload file ke memory
ftp.retrbinary(f"RETR {remote_file_path}", memory_file.write)
ftp.retrbinary("RETR {}".format(remote_file_path), memory_file.write)

# Pindahkan pointer ke awal agar siap untuk dibaca
memory_file.seek(0)
Expand All @@ -66,7 +66,7 @@ def read(self, remote_file_path):
return memory_file.read()
else:
# Mendownload file ke memory
self.connection.retrbinary(f"RETR {remote_file_path}", memory_file.write)
self.connection.retrbinary("RETR {}".format(remote_file_path), memory_file.write)

# Pindahkan pointer ke awal agar siap untuk dibaca
memory_file.seek(0)
Expand All @@ -82,9 +82,9 @@ def write(self, remote_file_path, data):
with FTP(self.host) as ftp:
ftp.login(user=self.user, passwd=self.password)
# Mengunggah file dari memory ke FTP server
ftp.storbinary(f"STOR {remote_file_path}", memory_file)
ftp.storbinary("STOR {}".format(remote_file_path), memory_file)
else:
self.connection.storbinary(f"STOR {remote_file_path}", memory_file)
self.connection.storbinary("STOR {}".format(remote_file_path), memory_file)

def exists(self, remote_path):
if not self.persistent == "True":
Expand Down
1 change: 0 additions & 1 deletion zcache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


Cache = Database
AsyncCache = AsyncDatabase
__version__ = "1.0.3"
__author__ = "Guangrei <[email protected]>"
__license__ = "MIT"

0 comments on commit 50f23d2

Please sign in to comment.