comparison hglib/client.py @ 167:f22f3ff3cfae

client: extract stub to read server's stderr on close() New _close() function will return (returncode, stderr) pair so that detailed error message can be obtained.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 07 Sep 2015 22:26:59 +0900
parents 11202c85737e
children d71bd813c9d7
comparison
equal deleted inserted replaced
166:bfdc96f22321 167:f22f3ff3cfae
198 returns the exit code. 198 returns the exit code.
199 199
200 Attempting to call any function afterwards that needs to 200 Attempting to call any function afterwards that needs to
201 communicate with the server will raise a ValueError. 201 communicate with the server will raise a ValueError.
202 """ 202 """
203 return self._close()
204
205 def _close(self):
203 self.server.stdin.close() 206 self.server.stdin.close()
204 self.server.wait() 207 self.server.wait()
205 ret = self.server.returncode 208 ret = self.server.returncode
206 self.server = None 209 self.server = None
207 return ret 210 return ret