修复数据类型错误导致的openresty lua error 从而使得useragent匹配失效的bug

This commit is contained in:
jd82k
2024-04-24 14:52:07 +08:00
committed by GitHub
parent c949e8d0f2
commit 4ecbfb3e58
+8 -3
View File
@@ -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)