From: Kevan Carstensen Date: Sat, 15 May 2010 18:43:44 +0000 (-0700) Subject: Hush pyflakes warnings X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/biz/?a=commitdiff_plain;h=d0706d27ea2624b5faf58f6e87e152454241b5d3;p=tahoe-lafs%2Ftahoe-lafs.git Hush pyflakes warnings --- diff --git a/src/allmydata/immutable/upload.py b/src/allmydata/immutable/upload.py index 092e4cc6..ca7d56be 100644 --- a/src/allmydata/immutable/upload.py +++ b/src/allmydata/immutable/upload.py @@ -404,7 +404,6 @@ class Tahoe2PeerSelector: return self._loop() else: # no more peers. If we haven't placed enough shares, we fail. - placed_shares = self.total_shares - len(self.homeless_shares) merged = merge_peers(self.preexisting_shares, self.use_peers) effective_happiness = servers_of_happiness(merged) if effective_happiness < self.servers_of_happiness: diff --git a/src/allmydata/test/test_upload.py b/src/allmydata/test/test_upload.py index 958f8d4e..7366e8d8 100644 --- a/src/allmydata/test/test_upload.py +++ b/src/allmydata/test/test_upload.py @@ -1563,9 +1563,9 @@ class EncodingParameters(GridTestMixin, unittest.TestCase, SetDEPMixin, self._add_server(server_number=5, readonly=True)) d.addCallback(lambda ign: self.g.remove_server(self.g.servers_by_number[0].my_nodeid)) - def _reset_encoding_parameters(ign): + def _reset_encoding_parameters(ign, happy=4): client = self.g.clients[0] - client.DEFAULT_ENCODING_PARAMETERS['happy'] = 4 + client.DEFAULT_ENCODING_PARAMETERS['happy'] = happy return client d.addCallback(_reset_encoding_parameters) d.addCallback(lambda client: @@ -1612,10 +1612,6 @@ class EncodingParameters(GridTestMixin, unittest.TestCase, SetDEPMixin, self._add_server(server_number=5, readonly=True)) d.addCallback(lambda ign: self.g.remove_server(self.g.servers_by_number[0].my_nodeid)) - def _reset_encoding_parameters(ign, happy=4): - client = self.g.clients[0] - client.DEFAULT_ENCODING_PARAMETERS['happy'] = happy - return client d.addCallback(_reset_encoding_parameters) d.addCallback(lambda client: self.shouldFail(UploadUnhappinessError, "test_selection_exceptions",