-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
bugfix: nacos-config.py script could not run with namespace #2932
Conversation
将!=改成<= 即可
Codecov Report
@@ Coverage Diff @@
## develop #2932 +/- ##
=============================================
- Coverage 50.28% 50.27% -0.02%
+ Complexity 3063 3062 -1
=============================================
Files 600 600
Lines 19503 19503
Branches 2404 2403 -1
=============================================
- Hits 9807 9805 -2
Misses 8712 8712
- Partials 984 986 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@luorenjin modify the pr title in En. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
请修改标题为英文,并且以bugfix: 开头 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
<=似乎依然不行,使用python nacos-config.py 192.168.168.128:1111 返回python nacos-config.py nacosAddr, |
namespace是可选参数,个人感觉应该是<2 |
将!=改成<= 即可
Ⅰ. Describe what this PR did
运行:python nacos-config.py 172.16.xxx.xxx:31263 seata
提示:python nacos-config.py nacosAddr
看逻辑得知,请求的参数数量判断逻辑错误了
源逻辑:
if len(sys.argv) != 2: print ('python nacos-config.py nacosAddr') exit()
修改后:
if len(sys.argv) <= 2: print ('python nacos-config.py nacosAddr') exit()
可以正确执行,带 namespace 参数的命令
Ⅱ. Does this pull request fix one issue?
自己发现的
Ⅲ. Why don't you add test cases (unit test/integration test)?
修改后保存:
执行 python nacos-config.py 172.16.xxx.xxx:31263 seata 成功,数据正确写入了nacos
Ⅳ. Describe how to verify it
查看命令窗口日志,并查看nacos配置,是否正确写入
Ⅴ. Special notes for reviews