changeset 2572:71fc1c98e02a beta

dont format errors to string in subprocessio
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 07 Jul 2012 19:35:18 +0200
parents 94a92bd832c5
children 0013297e306a
files rhodecode/lib/subprocessio.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/subprocessio.py	Sat Jul 07 16:00:56 2012 +0200
+++ b/rhodecode/lib/subprocessio.py	Sat Jul 07 19:35:18 2012 +0200
@@ -367,7 +367,8 @@
                 pass
             bg_out.stop()
             bg_err.stop()
-            raise EnvironmentError("Subprocess exited due to an error.\n" + "".join(bg_err))
+            err = '%r' % ''.join(bg_err)
+            raise EnvironmentError("Subprocess exited due to an error.\n" + err)
 
         self.process = _p
         self.output = bg_out
@@ -378,7 +379,8 @@
 
     def next(self):
         if self.process.poll():
-            raise EnvironmentError("Subprocess exited due to an error:\n" + ''.join(self.error))
+            err = '%r' % ''.join(self.error)
+            raise EnvironmentError("Subprocess exited due to an error:\n" + err)
         return self.output.next()
 
     def throw(self, type, value=None, traceback=None):