mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-20 08:25:50 +08:00
修复数据类型错误导致的openresty lua error 从而使得useragent匹配失效的bug
This commit is contained in:
@@ -971,9 +971,14 @@ def setRetry():
|
||||
conf = getJsonPath('config')
|
||||
content = mw.readFile(conf)
|
||||
cobj = json.loads(content)
|
||||
|
||||
cobj['retry'] = args
|
||||
|
||||
|
||||
## 修复数据类型错误
|
||||
tmp = args
|
||||
tmp['cycle'] = int(tmp['retry'])
|
||||
tmp['limit'] = int(tmp['retry_time'])
|
||||
tmp['endtime'] = int(tmp['retry_cycle'])
|
||||
|
||||
cobj['retry'] = tmp
|
||||
cjson = mw.getJson(cobj)
|
||||
mw.writeFile(conf, cjson)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user