[gedit] Separate stdout and stderr for external tools



commit d4ca51a3e84c7f1ef69d8ec9f91eb0285f7b267f
Author: Jesse van den Kieboom <jesse icecrew nl>
Date:   Sat Nov 7 22:12:41 2009 +0100

    Separate stdout and stderr for external tools

 plugins/externaltools/tools/capture.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/plugins/externaltools/tools/capture.py b/plugins/externaltools/tools/capture.py
index afee587..d8b21b5 100644
--- a/plugins/externaltools/tools/capture.py
+++ b/plugins/externaltools/tools/capture.py
@@ -78,10 +78,7 @@ class Capture(gobject.GObject):
         if self.flags & self.CAPTURE_STDOUT:
             popen_args['stdout'] = subprocess.PIPE
         if self.flags & self.CAPTURE_STDERR:
-            if self.flags & self.CAPTURE_STDOUT:
-                popen_args['stderr'] = subprocess.STDOUT
-            else:
-                popen_args['stderr'] = subprocess.PIPE
+            popen_args['stderr'] = subprocess.PIPE
 
         self.tried_killing = False
         self.idle_write_id = 0
@@ -106,7 +103,7 @@ class Capture(gobject.GObject):
                                  gobject.IO_IN | gobject.IO_HUP,
                                  self.on_output)
 
-        elif self.flags & self.CAPTURE_STDERR:
+        if self.flags & self.CAPTURE_STDERR:
             # Set non blocking
             flags = fcntl.fcntl(self.pipe.stderr.fileno(), fcntl.F_GETFL) | os.O_NONBLOCK
             fcntl.fcntl(self.pipe.stderr.fileno(), fcntl.F_SETFL, flags)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]