调用upload工具来上传服务器

This commit is contained in:
ranchuan
2023-09-15 10:27:19 +08:00
parent 9f9f6db125
commit efd4983bcb
5 changed files with 28 additions and 191 deletions

View File

@@ -2,7 +2,6 @@ import shutil
import sys
import os
import prebuild as time
import mysql
@@ -147,9 +146,12 @@ def main():
with open(dst,"wb") as f:
f.write(data)
print(dst+' create app file success.')
sql=mysql.sql()
if(sql.init(SQL_APP_PATH)==True):
sql.insert(dst)
readback=os.popen("upload "+SQL_APP_PATH+" "+dst).readlines()
for i in readback:
print(i)
# sql=mysql.sql()
# if(sql.init(SQL_APP_PATH)==True):
# sql.insert(dst)
boot=BOOT_FILE_SRC+".bin"
boot_dst=BOOT_FILE_DST+"_"+date+".bin"
if os.path.exists(boot):