[PATCH hglib] error: show more info on CommandError's __str__
Idan Kamara
idankk86 at gmail.com
Fri Jun 14 10:39:55 CDT 2013
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1371224216 -10800
# Fri Jun 14 18:36:56 2013 +0300
# Node ID 59cb26bf866e793b184842ad23f82fc3551d1742
# Parent 661f78f395eab8fc1617e30a0905db8b38c8e27b
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).
diff --git a/hglib/error.py b/hglib/error.py
--- a/hglib/error.py
+++ b/hglib/error.py
@@ -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
More information about the Mercurial-devel
mailing list