]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
add Client.get_remote_service utility method
authorBrian Warner <warner@lothar.com>
Fri, 1 Dec 2006 01:17:36 +0000 (18:17 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 1 Dec 2006 01:17:36 +0000 (18:17 -0700)
allmydata/client.py

index 44f65d561b0f2b3cde28135e9dea9de3bf94827a..f52afb733317b32b344013d800ec20c0a2cb55c5 100644 (file)
@@ -102,3 +102,9 @@ class Client(service.MultiService, Referenceable):
                 log.msg("weird, I didn't have an entry for them")
             if nodeid in self.connections:
                 del self.connections[nodeid]
+
+    def get_remote_service(self, nodeid, servicename):
+        if nodeid not in self.connections:
+            raise IndexError("no connection to that peer")
+        d = self.connections[nodeid].callRemote("get_service", name=servicename)
+        return d