aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/ack_checker.py6
-rw-r--r--python/task_server/globeop.py3
2 files changed, 3 insertions, 6 deletions
diff --git a/python/ack_checker.py b/python/ack_checker.py
index 2250d8b9..0dfa4ee2 100644
--- a/python/ack_checker.py
+++ b/python/ack_checker.py
@@ -10,8 +10,7 @@ import logging
def serenitas_files(date):
- ftp = FtpClient.from_creds("globeop")
- ftp.client.cwd("outgoing")
+ ftp = FtpClient.from_creds("globeop", folder="outgoing")
for f in ftp.client.nlst():
if f.startswith(f"Serenitas.ALL.{date:%Y%m%d}"):
buf = BytesIO()
@@ -21,8 +20,7 @@ def serenitas_files(date):
def bowdst_files(date):
- sftp = SftpClient.from_creds("hm_globeop")
- sftp.client.chdir("outgoing")
+ sftp = SftpClient.from_creds("hm_globeop", folder="outgoing")
for f in sftp.client.listdir():
if f.startswith(f"Bowdst.ALL.{date:%Y%m%d}"):
yield sftp.client.open(f)
diff --git a/python/task_server/globeop.py b/python/task_server/globeop.py
index 99ec3e45..d0dc2f2e 100644
--- a/python/task_server/globeop.py
+++ b/python/task_server/globeop.py
@@ -77,8 +77,7 @@ def convert_to_csv(f, fund):
def download_data(engine, workdate: datetime.date, fund="SERCGMAST"):
- ftp = FtpClient.from_creds("globeop")
- ftp.client.cwd("outgoing")
+ ftp = FtpClient.from_creds("globeop", folder="outgoing")
files = ftp.client.nlst()
pnlfiles = [
filename