[Reportbug-commits] [reportbug] 36/38: redirect stderr to stdout when running commands via get_command_output(), and this prevents errors to be sent to the terminal; Closes: #882130

Sandro Tosi morph at moszumanska.debian.org
Fri Dec 29 04:33:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit 0d3df9ac43c0f0e5f2e3e388221e99a0022fea7d
Author: Sandro Tosi <morph at debian.org>
Date:   Thu Dec 28 23:23:33 2017 -0500

    redirect stderr to stdout when running commands via get_command_output(), and this prevents errors to be sent to the terminal; Closes: #882130
---
 debian/changelog   | 4 +++-
 reportbug/utils.py | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1352868..6a0e60a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ reportbug (7.1.8) UNRELEASED; urgency=medium
   * reportbug/utils.py, bin/*
     - fix invalid escape sequence deprecation warnings with Python 3.6; patch by
       Ville Skyttä; Closes: #878437
+    - redirect stderr to stdout when running commands via get_command_output(),
+      and this prevents errors to be sent to the terminal; Closes: #882130
   * reportbug/ui/gtk2_ui.py
     - typo fix; Closes: #875309
   * debian/control
@@ -45,7 +47,7 @@ reportbug (7.1.8) UNRELEASED; urgency=medium
   * debian/rules
     - dont call dpkg-parsechangelog directly, use dpkg/pkg-info.mk instead
 
- -- Sandro Tosi <morph at debian.org>  Thu, 28 Dec 2017 21:25:21 -0500
+ -- Sandro Tosi <morph at debian.org>  Thu, 28 Dec 2017 23:22:28 -0500
 
 reportbug (7.1.7) unstable; urgency=medium
 
diff --git a/reportbug/utils.py b/reportbug/utils.py
index c615194..b376c6c 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -184,7 +184,7 @@ def get_command_output(cmd):
     use_shell = False
     if isinstance(cmd, str) and ' ' in cmd:
         use_shell = True
-    return subprocess.run(cmd, shell=use_shell, stdout=subprocess.PIPE).stdout.decode(errors='backslashreplace')
+    return subprocess.run(cmd, shell=use_shell, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode(errors='backslashreplace')
 
 
 def query_dpkg_for(filename, use_dlocate=True):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list