Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
修复更新ip后删除sqlite3数据库的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
a76yyyy committed Oct 28, 2021
1 parent 7e4630d commit 82f6cb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion IP_Sync/ip_Sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def sqldump(sql_file,table_college_info_sql_file,table_iprange_info_sql_file,tab
def sqlite3dump(sqlite3file):
print( "将SQLite3数据库压缩为gz文件: \n---------------处理中, 请稍候---------------")
if default_gz_export:
os.system('gzip -fq %s' % ( sqlite3file))
os.system('gzip -kfq %s' % ( sqlite3file))
print( "SQLite3数据库gz压缩档导出成功! \n")

if __name__ == '__main__':
Expand Down Expand Up @@ -313,6 +313,9 @@ def sqlite3dump(sqlite3file):
if default_sqlite3_update:
print( "===============SQLite3数据库更新=============== \n")
sqlite3file = config['sqlite3'].ip_database
sqlite3gz = sqlite3file+'.gz'
if os.path.exists(sqlite3gz) and not os.path.exists(sqlite3file):
os.system('gzip -dkf %s' % ( sqlite3gz))
sqlite3 = sqlite3_Database(sqlite3file)
if ipv4update:
dat2SQLite3(sqlite3)
Expand Down

0 comments on commit 82f6cb2

Please sign in to comment.