代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/fence-agents 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ec9d2d2b983d47a3c01be5fb3398b84ce09edfc9 Mon Sep 17 00:00:00 2001
From: razo7 <oraz@redhat.com>
Date: Mon, 24 Jul 2023 12:13:39 +0300
Subject: [PATCH 22/46] fencing: use EC_OK
EC_OK was not been used
---
lib/fencing.py.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
index 2c716b43..3a60f53e 100644
--- a/lib/fencing.py.py
+++ b/lib/fencing.py.py
@@ -938,7 +938,7 @@ def show_docs(options, docs=None):
sys.exit(0)
def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_list=None, reboot_cycle_fn=None, sync_set_power_fn=None):
- result = 0
+ result = EC_OK
try:
if "--plug" in options:
@@ -982,11 +982,11 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis
except UnicodeEncodeError as e:
print((outlet_id + options["--separator"] + alias).encode("utf-8") + options["--separator"] + status)
- return
+ return result
if options["--action"] == "monitor" and not "port" in options["device_opt"] and "no_status" in options["device_opt"]:
# Unable to do standard monitoring because 'status' action is not available
- return 0
+ return result
status = None
if not "no_status" in options["device_opt"]:
@@ -997,7 +997,7 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis
if options["--action"] == status:
if not (status == "on" and "force_on" in options["device_opt"]):
print("Success: Already %s" % (status.upper()))
- return 0
+ return result
if options["--action"] == "on":
if set_multi_power_fn(connection, options, set_power_fn, get_power_fn, sync_set_power_fn, 1 + int(options["--retry-on"])):
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。