중복되는 부분을 common.py에서 처리하도록 수정
This commit is contained in:
10
lib/common.py
Normal file
10
lib/common.py
Normal file
@ -0,0 +1,10 @@
|
||||
# common.py
|
||||
import os, yaml
|
||||
|
||||
def load_config():
|
||||
"""
|
||||
conf/config.yaml 파일을 UTF-8로 읽어 파이썬 dict로 반환
|
||||
"""
|
||||
path = os.path.join(os.path.dirname(__file__), '..', 'conf', 'config.yaml')
|
||||
with open(path, encoding='utf-8') as f:
|
||||
return yaml.safe_load(f)
|
||||
Reference in New Issue
Block a user