fix(choose_sentence): 다중 디렉토리 파싱시에 문제 발생하던거 해결
This commit is contained in:
parent
97c5a63bb8
commit
9258c87260
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue