changeset 117:59cb26bf866e

error: show more info on CommandError's __str__ Sometimes stderr doesn't contain anything which makes the current __str__ useless. We now return a tuple of (exit code, output, error).
author Idan Kamara <idankk86@gmail.com>
date Fri, 14 Jun 2013 18:36:56 +0300
parents 661f78f395ea
children e738d6fe5f3f
files hglib/error.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hglib/error.py	Sat Jun 01 17:13:39 2013 -0500
+++ b/hglib/error.py	Fri Jun 14 18:36:56 2013 +0300
@@ -6,7 +6,7 @@
         self.err = err
 
     def __str__(self):
-        return self.err
+        return str((self.ret, self.out.rstrip(), self.err.rstrip()))
 
 class ServerError(Exception):
     pass