Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

Commit 0da5eea

Browse files
authored
Update ip_Sync.py
1 parent 9aa271e commit 0da5eea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

IP_Sync/ip_Sync.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def sqldump(sql_file,table_college_info_sql_file,table_iprange_info_sql_file,tab
278278
def sqlite3dump(sqlite3file):
279279
print( "将SQLite3数据库压缩为gz文件: \n---------------处理中, 请稍候---------------")
280280
if default_gz_export:
281-
os.system('gzip -kfq %s' % ( sqlite3file))
281+
os.system('gzip -cfq %s > %s.gz' % (sqlite3file, sqlite3file))
282282
print( "SQLite3数据库gz压缩档导出成功! \n")
283283

284284
if __name__ == '__main__':
@@ -319,12 +319,12 @@ def sqlite3dump(sqlite3file):
319319
sqlite3file = config['sqlite3'].ip_database
320320
sqlite3gz = sqlite3file+'.gz'
321321
if os.path.exists(sqlite3gz) and not os.path.exists(sqlite3file):
322-
os.system('gzip -dkf %s' % ( sqlite3gz))
322+
os.system('gzip -cdf %s > %s' % (sqlite3gz, sqlite3file))
323323
sqlite3 = sqlite3_Database(sqlite3file)
324324
if ipv4update:
325325
dat2SQLite3(sqlite3)
326326
convertipv4(sqlite3,sqlite3file=sqlite3file)
327-
if ipv6update:
327+
# if ipv6update:
328328
db2SQLite3(sqlite3)
329329
try:
330330
sqlite3.__del__()

0 commit comments

Comments
 (0)