Remove ugly shadowing of Client.DEFAULT_ENCODING_PARAMETERS. fixes #1847

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood
2014-04-21 22:40:28 +01:00
parent 77b536c7a4
commit 77767e9e12
7 changed files with 54 additions and 52 deletions

View File

@ -130,7 +130,7 @@ class Client(node.Node, pollmixin.PollMixin):
node.Node.__init__(self, basedir)
self.started_timestamp = time.time()
self.logSource="Client"
self.DEFAULT_ENCODING_PARAMETERS = self.DEFAULT_ENCODING_PARAMETERS.copy()
self.encoding_params = self.DEFAULT_ENCODING_PARAMETERS.copy()
self.init_introducer_client()
self.init_stats_provider()
self.init_secrets()
@ -322,7 +322,7 @@ class Client(node.Node, pollmixin.PollMixin):
if helper_furl in ("None", ""):
helper_furl = None
DEP = self.DEFAULT_ENCODING_PARAMETERS
DEP = self.encoding_params
DEP["k"] = int(self.get_config("client", "shares.needed", DEP["k"]))
DEP["n"] = int(self.get_config("client", "shares.total", DEP["n"]))
DEP["happy"] = int(self.get_config("client", "shares.happy", DEP["happy"]))
@ -504,7 +504,7 @@ class Client(node.Node, pollmixin.PollMixin):
reactor.stop()
def get_encoding_parameters(self):
return self.DEFAULT_ENCODING_PARAMETERS
return self.encoding_params
def connected_to_introducer(self):
if self.introducer_client: