Skip to content

Commit

Permalink
Update update.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntek authored Sep 21, 2017
1 parent 730f82b commit 86fffd2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ def down_thread(url, data_list):
# 反馈百分比进度
@app.route('/admin/update/progress', methods=['POST'])
def update_progress():
progres = progress
if progres == 0: progres = 72
progres = '%.2f' % progres
if progress == 0: progress = 72
progres = '%.2f' % progress
return json.dumps(dict(result=progres))

# 检查项目
Expand Down Expand Up @@ -142,9 +141,7 @@ def update(backups=True):
return json.dumps(dict(r='', msg='在线更新不建议在调试模式下进行!请修改config.py ProductionConfig类 DEBUG = False<br /><br />Ps:你也可以用命令方式更新项目 直接运行update_flash.py即可'))

data_info = json.loads(insp_update(check=True))

if data_info['r'] != 'ok': return json.dumps(data_info)

data_list = data_info['list']

if len(data_list) > 0:
Expand Down

0 comments on commit 86fffd2

Please sign in to comment.