luxi.Client: Add function to close connection
authorMichael Hanselmann <hansmi@google.com>
Thu, 6 Jan 2011 18:16:21 +0000 (19:16 +0100)
committerMichael Hanselmann <hansmi@google.com>
Fri, 7 Jan 2011 11:02:46 +0000 (12:02 +0100)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/luxi.py

index 023fad7..77532cf 100644 (file)
@@ -427,6 +427,12 @@ class Client(object):
       self._CloseTransport()
       raise
 
+  def Close(self):
+    """Close the underlying connection.
+
+    """
+    self._CloseTransport()
+
   def CallMethod(self, method, args):
     """Send a generic request and return the response.