1 Star 0 Fork 16

bixiaoyan/fence-agents

forked from src-openEuler/fence-agents 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fence_bladecenter-fence_raritan_px3-use-r-on-regex-s.patch 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
From 989a079547b5c62d4e98ac0609136007e229c09e Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Fri, 20 Sep 2024 09:15:51 +0200
Subject: [PATCH 2/3] fence_bladecenter/fence_raritan_px3: use r"" on regex
string to avoid SyntaxWarning
---
agents/bladecenter/fence_bladecenter.py | 2 +-
agents/raritan_px3/fence_raritan_px3.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/agents/bladecenter/fence_bladecenter.py b/agents/bladecenter/fence_bladecenter.py
index 2f2c65fc..a1e53066 100644
--- a/agents/bladecenter/fence_bladecenter.py
+++ b/agents/bladecenter/fence_bladecenter.py
@@ -96,7 +96,7 @@ and uses the command line interface to power on and off blades."
##
## Operate the fencing device
######
- conn = fence_login(options, "(username\s*:\s*)")
+ conn = fence_login(options, r"(username\s*:\s*)")
result = fence_action(conn, options, set_power_status, get_power_status, get_blades_list)
fence_logout(conn, "exit")
sys.exit(result)
diff --git a/agents/raritan_px3/fence_raritan_px3.py b/agents/raritan_px3/fence_raritan_px3.py
index 9b8ce1bf..b1c7436b 100644
--- a/agents/raritan_px3/fence_raritan_px3.py
+++ b/agents/raritan_px3/fence_raritan_px3.py
@@ -157,7 +157,7 @@ firmware versions. It's recommended to update to at least version 3.6.x"
docs["vendorurl"] = "http://www.raritan.com/"
show_docs(options, docs)
- conn = fence_login(options, re_login_string="Username.*")
+ conn = fence_login(options, re_login_string=r"Username.*")
px3_get_outlet_list(conn, options)
try:
--
2.33.1.windows.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bixiaoyan1/fence-agents.git
git@gitee.com:bixiaoyan1/fence-agents.git
bixiaoyan1
fence-agents
fence-agents
master

搜索帮助