From d0706d27ea2624b5faf58f6e87e152454241b5d3 Mon Sep 17 00:00:00 2001
From: Kevan Carstensen <kevan@isnotajoke.com>
Date: Sat, 15 May 2010 11:43:44 -0700
Subject: [PATCH] Hush pyflakes warnings

---
 src/allmydata/immutable/upload.py | 1 -
 src/allmydata/test/test_upload.py | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

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",
-- 
2.45.2