Update system_api.py

pull/109/head
midoks 6 years ago
parent 7038e8f274
commit 91b8dbafe3
  1. 9
      class/core/system_api.py

@ -601,12 +601,11 @@ class system_api:
upAddr = 'https://raw.githubusercontent.com/midoks/mdserver-web/master/version' upAddr = 'https://raw.githubusercontent.com/midoks/mdserver-web/master/version'
try: try:
version = public.httpGet( version = public.httpGet(upAddr + '/info.json')
upAddr + '/info.json')
version = json.loads(version) version = json.loads(version)
return version[0] return version[0]
except Exception as e: except Exception as e:
print e print 'getServerInfo', e
return {} return {}
def updateServer(self, stype, version=''): def updateServer(self, stype, version=''):
@ -681,15 +680,13 @@ class system_api:
return public.returnJson(False, '已经是最新,无需更新!') return public.returnJson(False, '已经是最新,无需更新!')
except Exception as ex: except Exception as ex:
print ex print 'updateServer', ex
return public.returnJson(False, "连接服务器失败!") return public.returnJson(False, "连接服务器失败!")
# 重启面板 # 重启面板
def reWeb(self, get): def reWeb(self, get):
if not public.isRestart(): if not public.isRestart():
public.returnMsg(False, '请等待所有安装任务完成再执行!') public.returnMsg(False, '请等待所有安装任务完成再执行!')
# public.ExecShell('/etc/init.d/bt restart &')
public.returnMsg(True, '执行成功!') public.returnMsg(True, '执行成功!')
# 修复面板 # 修复面板

Loading…
Cancel
Save