Rev 5904: The missing bit ! stderr_file needs to be propagated with care down to Popen or we either don't use it or override useful default values. in file:///home/vila/src/bzr/reviews/import-tariff-test-subprocess-deadlock/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri May 27 14:50:58 UTC 2011


At file:///home/vila/src/bzr/reviews/import-tariff-test-subprocess-deadlock/

------------------------------------------------------------
revno: 5904
revision-id: v.ladeuil+lp at free.fr-20110527145058-fa1r7r7caosojaav
parent: andrew.bennetts at canonical.com-20110527055157-64icfde8m9pimhyo
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: import-tariff-test-subprocess-deadlock
timestamp: Fri 2011-05-27 16:50:58 +0200
message:
  The missing bit ! stderr_file needs to be propagated with care down to Popen or we either don't use it or override useful default values.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py	2011-05-19 16:24:50 +0000
+++ b/bzrlib/tests/test_import_tariff.py	2011-05-27 14:50:58 +0000
@@ -79,8 +79,13 @@
         # explicitly do want to test against things installed there, therefore
         # we pass it through.
         env_changes = dict(PYTHONVERBOSE='1', **self.preserved_env_vars)
-        return self.start_bzr_subprocess(args, env_changes=env_changes,
-            allow_plugins=(not are_plugins_disabled()))
+        kwargs = dict(env_changes=env_changes,
+                      allow_plugins=(not are_plugins_disabled()))
+        if stderr_file:
+            # We don't want to update the whole call chain so we insert stderr
+            # *iff* we need to
+            kwargs['stderr'] = stderr_file
+        return self.start_bzr_subprocess(args, **kwargs)
 
     def check_forbidden_modules(self, err, forbidden_imports):
         """Check for forbidden modules in stderr.



More information about the bazaar-commits mailing list