Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_nacos_server_addr()地址解析错误 #151

Open
Liyurun opened this issue Feb 20, 2024 · 0 comments
Open

parse_nacos_server_addr()地址解析错误 #151

Liyurun opened this issue Feb 20, 2024 · 0 comments

Comments

@Liyurun
Copy link

Liyurun commented Feb 20, 2024

def parse_nacos_server_addr(server_addr): sp = server_addr.split(":") if len(sp) == 3: return sp[0] + ":" + sp[1], int(sp[2]) else: port = int(sp[1]) if len(sp) > 1 else 8848 return sp[0], port
int(sp[2])遇到非int的路径报错,sp[2]不一定是具体的端口号,可能包含其他路径,如:8080/diamond**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant