]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Hush pyflakes warnings
authorKevan Carstensen <kevan@isnotajoke.com>
Sat, 15 May 2010 18:43:44 +0000 (11:43 -0700)
committerKevan Carstensen <kevan@isnotajoke.com>
Sat, 15 May 2010 18:43:44 +0000 (11:43 -0700)
src/allmydata/immutable/upload.py
src/allmydata/test/test_upload.py

index 092e4cc67125efbf16650f3cb6c9c923548c1380..ca7d56bef584e1686b2c24eaf11cd7c456ec3ccd 100644 (file)
@@ -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:
index 958f8d4e93c05901fa7d680511282aac59240126..7366e8d8f24032e21869018db0a726bcd350e46b 100644 (file)
@@ -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",