Skip to content

Commit be7b250

Browse files
committed
FIXED: bug
1 parent e18d4e2 commit be7b250

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

cvemysql.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def help(error=None):
154154

155155
if len(file_path_list) <= 1:
156156
file_path_list = [file_path]
157-
158157
file_path = []
159158
ENVPATH = os.environ.items()
160159
for p in file_path_list:
@@ -163,7 +162,8 @@ def help(error=None):
163162
if '$'+name in p:
164163
p = p.replace('$'+name, variable).replace("\\", "/")
165164
file_path.append(p)
166-
year_based_task = False
165+
if len(file_path) > 0:
166+
year_based_task = False
167167
else:
168168
print("정보: 지정된 파일 경로가 없습니다. 제공자 사이트에서 데이터를 가져옵니다. 이 경우에는 별도의 인터넷 환경이 요구될 수 있습니다.")
169169

nvdnist.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ def workstation(sql, tablename, jsonElement):
205205
except SystemExit:
206206
sys.exit()
207207

208-
def handler(signal, frame):
209-
print("KILLED: %s %s" % (signal, frame))
210-
211-
212208
class Nvdnist(CVEDatabase):
213209
def __init__(self, mysql_base):
214210
super().__init__(mysql_base)
@@ -218,8 +214,6 @@ def export(self, export_path_name, export_type, tablename, option="ORDER BY cve_
218214
return super().export(export_path_name, export_type, tablename, option)
219215

220216
def load(self, obj):
221-
signal.signal(signal.SIGTERM, handler)
222-
223217
# 작업 대상 연도
224218
year = None
225219
# RAW 파일명 (경로를 포함하고 있습니다.)
@@ -228,7 +222,7 @@ def load(self, obj):
228222
url = None
229223
# RAW 파일 확장자
230224
filetype = None
231-
225+
232226
# 파일 지정
233227
specific_path = None
234228

@@ -271,6 +265,7 @@ def load(self, obj):
271265

272266
if os.path.exists(raw_file) is False:
273267
util.extract(filename, "./")
268+
274269
if os.path.exists(raw_file):
275270
if util.vaildjson(raw_file):
276271
print("The resource file already exist, continue without the downloed")

0 commit comments

Comments
 (0)