Mercurial > python-hglib
annotate hglib/error.py @ 90:b894c2222dff
client: replace usage of namedtuple for python 2.4 compatibility
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 22 Dec 2011 19:12:39 +0200 |
parents | 00bb0701323a |
children | 59cb26bf866e |
rev | line source |
---|---|
0 | 1 class CommandError(Exception): |
2 def __init__(self, args, ret, out, err): | |
3 self.args = args | |
4 self.ret = ret | |
5 self.out = out | |
6 self.err = err | |
7 | |
36
00bb0701323a
error: return stderr as __str__ for CommandError
Idan Kamara <idankk86@gmail.com>
parents:
0
diff
changeset
|
8 def __str__(self): |
00bb0701323a
error: return stderr as __str__ for CommandError
Idan Kamara <idankk86@gmail.com>
parents:
0
diff
changeset
|
9 return self.err |
00bb0701323a
error: return stderr as __str__ for CommandError
Idan Kamara <idankk86@gmail.com>
parents:
0
diff
changeset
|
10 |
0 | 11 class ServerError(Exception): |
12 pass | |
13 | |
14 class ResponseError(ServerError, ValueError): | |
15 pass | |
16 | |
17 class CapabilityError(ServerError): | |
18 pass |