From: Brian Warner Date: Wed, 28 Mar 2007 00:44:49 +0000 (-0700) Subject: fix some python2.5 incompatibilities, and remove an old webish display that suggested... X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/statistics?a=commitdiff_plain;h=611178490aad421a082ad959d3337c216dbd889f;p=tahoe-lafs%2Ftahoe-lafs.git fix some python2.5 incompatibilities, and remove an old webish display that suggested we might know about peers but not be connected to them --- diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index 709390ed..346b34de 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -89,7 +89,8 @@ class SystemTest(unittest.TestCase): def wait_for_connections(self, ignored=None): for c in self.clients: - if not c.introducer_client or len(c.get_all_peerids()) != self.numclients: + if (not c.introducer_client or + len(list(c.get_all_peerids())) != self.numclients): d = defer.Deferred() d.addCallback(self.wait_for_connections) reactor.callLater(0.05, d.callback, None) @@ -103,7 +104,7 @@ class SystemTest(unittest.TestCase): def _check(extra_node): self.extra_node = extra_node for c in self.clients: - self.failUnlessEqual(len(c.get_all_peerids()), 6) + self.failUnlessEqual(len(list(c.get_all_peerids())), 6) d.addCallback(_check) def _shutdown_extra_node(res): if self.extra_node: diff --git a/src/allmydata/web/welcome.xhtml b/src/allmydata/web/welcome.xhtml index 5d8ad3b8..11006bf6 100644 --- a/src/allmydata/web/welcome.xhtml +++ b/src/allmydata/web/welcome.xhtml @@ -16,8 +16,7 @@
Queen:
Connected to queen?:
-
Known Peers:
-
Connected Peers:
+
Known+Connected Peers:
diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index ca86f61e..f3f38de4 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -36,9 +36,7 @@ class Welcome(rend.Page): def data_num_peers(self, ctx, data): #client = inevow.ISite(ctx)._client client = IClient(ctx) - return len(client.get_all_peerids()) - def data_num_connected_peers(self, ctx, data): - return len(IClient(ctx).get_all_peerids()) + return len(list(client.get_all_peerids())) def data_peers(self, ctx, data): d = []