Skip to content

Commit

Permalink
fixed the exit() bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenblue committed Aug 5, 2023
1 parent da2122e commit 9f0a373
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions save2excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os

import xlwt
import sys


def save2excel(dbpath):
Expand Down Expand Up @@ -82,14 +83,14 @@ def gettable(dbpath):
if tablelist == None:
print("目标数据库不存在或者内容为空,请检查数据库,即将退出")
sleep(1)
exit()
sys.exit(-1)
print("\n")
x = 99
while x != 0:
sleep(0.5)
print("当前目录数据库中含有以下table(数据表格)pubmed后面的数字为生成时精确到秒的时间\n", '----' * 20, '\n')
for i in range(len(tablelist)):
print("[%d]%s " % (i + 1, tablelist[i]), end='')
print("[%d]%s " % (i + 1, tablelist[i]))
print("\n")
print('----' * 20)
try:
Expand Down

0 comments on commit 9f0a373

Please sign in to comment.