Mercurial > public > mercurial-scm > python-hglib
comparison hglib/error.py @ 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 | 00bb0701323a |
children |
comparison
equal
deleted
inserted
replaced
116:661f78f395ea | 117:59cb26bf866e |
---|---|
4 self.ret = ret | 4 self.ret = ret |
5 self.out = out | 5 self.out = out |
6 self.err = err | 6 self.err = err |
7 | 7 |
8 def __str__(self): | 8 def __str__(self): |
9 return self.err | 9 return str((self.ret, self.out.rstrip(), self.err.rstrip())) |
10 | 10 |
11 class ServerError(Exception): | 11 class ServerError(Exception): |
12 pass | 12 pass |
13 | 13 |
14 class ResponseError(ServerError, ValueError): | 14 class ResponseError(ServerError, ValueError): |