Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:GA
resource-agents.11694
0033-Fix-implicit-bytes-conversion-that-breaks-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0033-Fix-implicit-bytes-conversion-that-breaks-py3.patch of Package resource-agents.11694
From d2c47ec3b67e0360a040814bb68c8577ac2fdb8c Mon Sep 17 00:00:00 2001 From: Diego Akechi <dakechi@suse.com> Date: Mon, 3 Jun 2019 14:58:40 +0200 Subject: [PATCH] Fix implicit bytes conversion that breaks py3. Reduces the amount of errors messages using default value on crm_attribute --- heartbeat/azure-events.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/heartbeat/azure-events.in b/heartbeat/azure-events.in index 3c4fe5e1..92af85f0 100644 --- a/heartbeat/azure-events.in +++ b/heartbeat/azure-events.in @@ -206,6 +206,7 @@ class clusterHelper: val = clusterHelper._exec("crm_attribute", "--name", key, "--query", "--quiet", + "--default", "", clusterHelper._getLocation(node)) ocf.logger.debug("getAttr: finished") if not val: @@ -221,7 +222,7 @@ class clusterHelper: nodes = [] nodeList = clusterHelper._exec("crm_node", "--list") - for n in nodeList.split("\n"): + for n in nodeList.decode().split("\n"): nodes.append(n.split()[1]) ocf.logger.debug("getAllNodes: finished; return %s" % str(nodes)) @@ -292,7 +293,7 @@ class clusterHelper: ocf.logger.warning("transitionSummary: received unexpected transition summary: %s" % summary) return False summary = summary.split("Transition Summary:")[1] - ret = summary.split("\n").pop(0) + ret = summary.decode().split("\n").pop(0) ocf.logger.debug("transitionSummary: finished; return = %s" % str(ret)) return ret @@ -313,7 +314,7 @@ class clusterHelper: if len(resources) == 0: ret = [] else: - ret = resources.split("\n") + ret = resources.decode().split("\n") ocf.logger.debug("listOperationsOnNode: finished; return = %s" % str(ret)) return ret @@ -459,7 +460,7 @@ class Node: eventIDStr = clusterHelper.getAttr(attr_pendingEventIDs, node=node) if eventIDStr: - eventIDs = eventIDStr.split(",") + eventIDs = eventIDStr.decode().split(",") else: eventIDs = None -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor