Mercurial > python-hglib
view hglib/error.py @ 221:a2afbf236ca8
hglib tests: remove deprecated constructions
This mostly removes usage of 'assertEquals' (replaced with 'assertEqual'),
as well as opening files without closing them
(fixed using a 'with' statement).
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Thu, 09 Mar 2023 14:00:02 +0100 |
parents | 59cb26bf866e |
children |
line wrap: on
line source
class CommandError(Exception): def __init__(self, args, ret, out, err): self.args = args self.ret = ret self.out = out self.err = err def __str__(self): return str((self.ret, self.out.rstrip(), self.err.rstrip())) class ServerError(Exception): pass class ResponseError(ServerError, ValueError): pass class CapabilityError(ServerError): pass