Commit 2fd418a2 authored by KangMin An's avatar KangMin An
Browse files

Update : 매개변수 파일 저장 시 경로 오류 해결.

parent 4ca38377
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
""" """
import datetime import datetime
from os import getcwd from os import getcwd, path, makedirs
import sys import sys
import pymysql import pymysql
import numpy as np import numpy as np
...@@ -22,9 +22,15 @@ def storeParameters(link, filename, data): ...@@ -22,9 +22,15 @@ def storeParameters(link, filename, data):
time_dir = '/' + year + '/' + year+month + '/' + year + month + day time_dir = '/' + year + '/' + year+month + '/' + year + month + day
file_dir = getcwd() + link + time_dir + filename file_dir = getcwd() + link + time_dir
file = open(file_dir, "w") try:
if not path.exists(file_dir):
makedirs(file_dir)
except:
print("Error : Creating Directory - ", file_dir)
file = open(file_dir + filename, "w")
file.write(data) file.write(data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment