chore: 优化代码

This commit is contained in:
lerdb
2023-12-02 12:10:31 +08:00
parent 37b1349e38
commit 98410ce11f
4 changed files with 18 additions and 13 deletions

View File

@ -27,12 +27,10 @@ def checklxmheader(lxm, url):
arr, outsideversion = tuple([cop.split(']')[0] + ']', cop.split(']')[1]])
arr = json.loads(arr)
version = re.findall("\\d+", version)[0]
if (not outsideversion.startswith(version)):
if not outsideversion.startswith(version):
return False
if (
(not (version) in ("".join(arr))) and
(not (retvalue) in "".join(arr))
):
if (not (version) in ("".join(arr))) and (not (retvalue) in "".join(arr)):
return False
return True
except: