From 831ecec0fba1ff283606870d049132dbd5687c0c Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 30 Nov 2006 18:17:36 -0700 Subject: [PATCH] add Client.get_remote_service utility method --- allmydata/client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/allmydata/client.py b/allmydata/client.py index 44f65d56..f52afb73 100644 --- a/allmydata/client.py +++ b/allmydata/client.py @@ -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 -- 2.45.2