From 9258c87260045bd367e88eb1349a4e35bbe4b960 Mon Sep 17 00:00:00 2001 From: kdh8219 Date: Sat, 23 Dec 2023 19:33:28 +0900 Subject: [PATCH] =?UTF-8?q?fix(choose=5Fsentence):=20=EB=8B=A4=EC=A4=91=20?= =?UTF-8?q?=EB=94=94=EB=A0=89=ED=86=A0=EB=A6=AC=20=ED=8C=8C=EC=8B=B1?= =?UTF-8?q?=EC=8B=9C=EC=97=90=20=EB=AC=B8=EC=A0=9C=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=ED=95=98=EB=8D=98=EA=B1=B0=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/choose_sentence.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/choose_sentence.py b/src/choose_sentence.py index 7691f7b..c52511a 100644 --- a/src/choose_sentence.py +++ b/src/choose_sentence.py @@ -11,7 +11,7 @@ load_dotenv() _sentences=[] try: sentence_files=[] - + if os.environ.get("SENTENCES_FILE") and os.path.isfile(os.environ["SENTENCES_FILE"]): sentence_files.append(os.environ["SENTENCE_FILES"]) @@ -23,7 +23,7 @@ try: if os.environ.get("SENTENCES_DIRECTORIES"): # 원라인 똥 뿌직(터져도 책임 안짐) - sentence_files.extend([glob(f"{_dir}*.txt") for _dir in filter(os.path.isdir, json.loads(os.environ["SENTENCES_DIRECTORIES"]))]) + sentence_files.extend([glob(f"{_dir}*.txt") for _dir in filter(os.path.isdir, json.loads(os.environ["SENTENCES_DIRECTORIES"]))][0]) for sentence_file in sentence_files: with open(sentence_file, "r") as f: