代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/thrift 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py b/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
index 4b1c257..df1c8cc 100644
--- a/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
+++ b/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
@@ -57,24 +57,24 @@ def service_ctrl(
msg = fb_status_string(status)
if (len(status_details)):
msg += " - %s" % status_details
- print msg
+ print(msg)
if (status == fb_status.ALIVE):
return 2
else:
return 3
except:
- print "Failed to get status"
+ print("Failed to get status")
return 3
# scalar commands
if command in ["version", "alive", "name"]:
try:
result = fb303_wrapper(command, port, trans_factory, prot_factory)
- print result
+ print(result)
return 0
except:
- print "failed to get ", command
+ print("failed to get ", command)
return 3
# counters
@@ -82,10 +82,10 @@ def service_ctrl(
try:
counters = fb303_wrapper('counters', port, trans_factory, prot_factory)
for counter in counters:
- print "%s: %d" % (counter, counters[counter])
+ print("%s: %d" % (counter, counters[counter]))
return 0
except:
- print "failed to get counters"
+ print("failed to get counters")
return 3
# Only root should be able to run the following commands
@@ -96,19 +96,19 @@ def service_ctrl(
fb303_wrapper(command, port, trans_factory, prot_factory)
return 0
except:
- print "failed to tell the service to ", command
+ print("failed to tell the service to ", command)
return 3
else:
if command in ["stop", "reload"]:
- print "root privileges are required to stop or reload the service."
+ print("root privileges are required to stop or reload the service.")
return 4
- print "The following commands are available:"
+ print("The following commands are available:")
for command in ["counters", "name", "version", "alive", "status"]:
- print "\t%s" % command
- print "The following commands are available for users with root privileges:"
+ print("\t%s" % command)
+ print("The following commands are available for users with root privileges:")
for command in ["stop", "reload"]:
- print "\t%s" % command
+ print("\t%s" % command)
return 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。