# HG changeset patch # User Gábor Stefanik # Date 1503327973 -7200 # Node ID f38bc05696713624628641e6a042d2219830ef09 # Parent 8054e925d9c764cfbf26aeba64b39de4e72aa21a client: don't swallow ResponseError inside open() _readhello() can generate meaningful ResponseError exceptions. However, open()'s exception handler swallows these, converting them into generic ServerErrors. Allow the original ResponseErrors to pass through. diff -r 8054e925d9c7 -r f38bc0569671 hglib/client.py --- a/hglib/client.py Mon Aug 21 17:02:14 2017 +0200 +++ b/hglib/client.py Mon Aug 21 17:06:13 2017 +0200 @@ -259,6 +259,9 @@ self.server = util.popen(self._args, self._env) try: self._readhello() + except error.ResponseError: + self.close() + raise except error.ServerError: ret, serr = self._close() raise error.ServerError('server exited with status %d: %s'