Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
fence-agents.8145
0005-run_command-fix-Python-3-encoding-issue.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-run_command-fix-Python-3-encoding-issue.patch of Package fence-agents.8145
From b587642048b9f75cdc08d4d9e3fa03f14811cc21 Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen <oalbrigt@redhat.com> Date: Fri, 20 Apr 2018 15:16:42 +0200 Subject: [PATCH 5/5] run_command: fix Python 3 encoding issue --- fence/agents/lib/fencing.py.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index 5b38460e..15914f0f 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -995,7 +995,9 @@ def run_command(options, command, timeout=None, env=None, log_command=None): logging.info("Executing: %s\n", log_command or command) try: - process = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) + process = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env, + # decodes newlines and in python3 also converts bytes to str + universal_newlines=(sys.version_info[0] > 2)) except OSError: fail_usage("Unable to run %s\n" % command) -- 2.16.3
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