代码拉取完成,页面将自动刷新
From 6ed227367b6eb7d6d7afde3859ad0a711a3adf36 Mon Sep 17 00:00:00 2001
From: Leela Venkaiah G <[email protected]>
Date: Wed, 13 Jan 2021 16:02:25 +0530
Subject: [PATCH 519/526] glusterfs-events: Fix incorrect attribute access
(#2002)
Issue: When GlusterCmdException is raised, current code try to access
message atrribute which doesn't exist and resulting in a malformed
error string on failure operations
Code Change: Replace `message` with `args[0]`
>Fixes: #2001
>Change-Id: I65c9f0ee79310937a384025b8d454acda154e4bb
>Signed-off-by: Leela Venkaiah G <[email protected]>
Upstream patch: https://github.com/gluster/glusterfs/pull/2002
BUG: 1600459
Change-Id: I65c9f0ee79310937a384025b8d454acda154e4bb
Signed-off-by: srijan-sivakumar <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/223584
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <[email protected]>
---
events/src/peer_eventsapi.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/events/src/peer_eventsapi.py b/events/src/peer_eventsapi.py
index 26b77a0..c388da4 100644
--- a/events/src/peer_eventsapi.py
+++ b/events/src/peer_eventsapi.py
@@ -174,9 +174,9 @@ def sync_to_peers(args):
sync_file_to_peers(WEBHOOKS_FILE_TO_SYNC)
except GlusterCmdException as e:
# Print stdout if stderr is empty
- errmsg = e.message[2] if e.message[2] else e.message[1]
+ errmsg = e.args[0][2] if e.args[0][2] else e.args[0][1]
handle_output_error("Failed to sync Webhooks file: [Error: {0}]"
- "{1}".format(e.message[0], errmsg),
+ "{1}".format(e.args[0][0], errmsg),
errcode=ERROR_WEBHOOK_SYNC_FAILED,
json_output=args.json)
@@ -185,9 +185,9 @@ def sync_to_peers(args):
sync_file_to_peers(CUSTOM_CONFIG_FILE_TO_SYNC)
except GlusterCmdException as e:
# Print stdout if stderr is empty
- errmsg = e.message[2] if e.message[2] else e.message[1]
+ errmsg = e.args[0][2] if e.args[0][2] else e.args[0][1]
handle_output_error("Failed to sync Config file: [Error: {0}]"
- "{1}".format(e.message[0], errmsg),
+ "{1}".format(e.args[0][0], errmsg),
errcode=ERROR_CONFIG_SYNC_FAILED,
json_output=args.json)
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。