mirror of
https://github.com/KaringX/karing-ruleset.git
synced 2025-06-08 14:34:13 +08:00
error msg fixed index out of range
This commit is contained in:
parent
c751a8f384
commit
b13590994c
@ -1,5 +1,11 @@
|
|||||||
# rule-set collection for sing-box/karing
|
# rule-set collection for sing-box/karing
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
- [GeoIp/GeoSite](https://github.com/KaringX/karing-ruleset/tree/workflow?tab=readme-ov-file#geoipgeosite)
|
||||||
|
- [ACL4SSR](https://github.com/KaringX/karing-ruleset/tree/workflow?tab=readme-ov-file#sing-boxkaring-rule-set%E8%A7%84%E5%88%99%E7%A2%8E%E7%89%87)
|
||||||
|
- [AdGuardSDNSFilter](https://github.com/KaringX/karing-ruleset/tree/workflow?tab=readme-ov-file#adguardsdnsfilter)
|
||||||
|
|
||||||
|
|
||||||
## Thanks to
|
## Thanks to
|
||||||
- [meta-rules-dat](https://github.com/MetaCubeX/meta-rules-dat/raw/sing/geo)
|
- [meta-rules-dat](https://github.com/MetaCubeX/meta-rules-dat/raw/sing/geo)
|
||||||
- [Chocolate4U-Iran](https://github.com/Chocolate4U/Iran-sing-box-rules/tree/rule-set?tab=readme-ov-file) 、[v2ray/xray client configuration](https://github.com/Chocolate4U/Iran-v2ray-rules?tab=readme-ov-file#computer-usage)
|
- [Chocolate4U-Iran](https://github.com/Chocolate4U/Iran-sing-box-rules/tree/rule-set?tab=readme-ov-file) 、[v2ray/xray client configuration](https://github.com/Chocolate4U/Iran-v2ray-rules?tab=readme-ov-file#computer-usage)
|
||||||
|
@ -59,21 +59,15 @@ def converto_srs(out_path: str, file_name: str) -> bool:
|
|||||||
|
|
||||||
# if result.stderr:
|
# if result.stderr:
|
||||||
# Filter out lines that start with "DEBUG"
|
# Filter out lines that start with "DEBUG"
|
||||||
output_lines = [
|
error_lines = [
|
||||||
line for line in result.stderr.splitlines() if not line.startswith("DEBUG")
|
line for line in result.stderr.splitlines() if not line.startswith("DEBUG")
|
||||||
]
|
]
|
||||||
|
error_msg = error_lines[-1] if len(error_lines) > 0 else ""
|
||||||
|
|
||||||
debug_log(
|
debug_log(
|
||||||
f"Convert code:{result.returncode} error:{output_lines[-1]} output:{result.stdout}"
|
f"Convert code:{result.returncode} error:{error_msg} output:{result.stdout}"
|
||||||
)
|
|
||||||
return (
|
|
||||||
True
|
|
||||||
if (
|
|
||||||
len(output_lines) > 0
|
|
||||||
and remove_ansi_escape_codes(output_lines[-1]).startswith('INFO')
|
|
||||||
)
|
|
||||||
else False
|
|
||||||
)
|
)
|
||||||
|
return True if remove_ansi_escape_codes(error_msg).startswith('INFO') else False
|
||||||
# END converto_srs
|
# END converto_srs
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user