Skip to content

Commit

Permalink
Fix double implementation of get_ftps
Browse files Browse the repository at this point in the history
  • Loading branch information
elpablete committed Nov 1, 2023
1 parent 8c5e7ad commit 9337fb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/asic/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.2.2
25 changes: 1 addition & 24 deletions src/asic/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datetime as dt
import ftplib
import logging
import os
import pathlib
Expand All @@ -14,6 +13,7 @@
from asic.config import ASICFileVisibility
from asic.files import SupportedFiles
from asic.ftp import (
get_ftps,
grab_file, # list_supported_files_in_location,
list_supported_files,
)
Expand Down Expand Up @@ -77,29 +77,6 @@ def main(
ctx.meta["ASIC_FTPS_PASSWORD"] = pydantic.SecretStr(ftps_password)


def get_ftps(
ftps_host: str,
ftps_user: str,
ftps_password: str,
ftps_port: int,
):
ftps = ftplib.FTP_TLS(
host=ftps_host,
encoding="Latin-1",
# timeout=10,
)

ftps.connect(
port=ftps_port,
)
logger.info(f"Login to FTP '{ftps_host}' as '{ftps_user}'")
ftps.login(user=ftps_user, passwd=ftps_password.get_secret_value())

ftps.prot_p()

return ftps


def parse_month(month: str) -> dt.date:
for f in YEAR_MONTH_FORMATS:
try:
Expand Down

0 comments on commit 9337fb1

Please sign in to comment.