Lele Gaifax wrote:
Il giorno mar, 17/07/2007 alle 10.09 +0200, Henry Nestler ha scritto:
In vcpx/shwrap.py found this bad news (Tue Jul 10 18:13:09 CEST 2007):
@@ -87,6 +89,8 @@ class ExternalCommand:
          r = '$'+repr(self)
          if self.cwd:
              r = self.cwd + ' ' + r
+        if self.capture_stderr:
+            r = r + ' 2>&1'
          return r

      def __repr__(self):
@@ -137,6 +141,11 @@ class ExternalCommand:

          from cStringIO import StringIO

+        if kwargs.get('stderr'):
+            self.capture_stderr = True
+        else:
+            self.capture_stderr = False
+
          if len(args) == 1 and type(args[0]) == type([]):
              allargs = list(args[0])
          else:
<<< end diff <<<

I think, the 'capture_stderr' should only TRUE, if the parameter is
'stderr=STDOUT'? (found on vcpx/repository/cvs.py:618)


I think you misunderstood the change: its *only* effect is visual for
the user, that is, when the *caller* explicitly asks for stderr, the
__str__() method of the class appends a " 2>&1" to the *visual
representation* of the command that will be printed in the log. The
"self.capture_stderr" flag is used only in the __str__() method.

OK. Sorry for misunderstandings.
My Python knows are not very good. :-(

--
Henry

_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to