changeset 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 bfdc96f22321
children d71bd813c9d7
files hglib/client.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hglib/client.py	Tue Sep 01 17:03:10 2015 -0500
+++ b/hglib/client.py	Mon Sep 07 22:26:59 2015 +0900
@@ -200,6 +200,9 @@
         Attempting to call any function afterwards that needs to
         communicate with the server will raise a ValueError.
         """
+        return self._close()
+
+    def _close(self):
         self.server.stdin.close()
         self.server.wait()
         ret = self.server.returncode