diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2015-07-23 14:56:49 -0300 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-07-24 11:40:09 -0400 |
commit | 2b8015c9983fa2aff46032cf1e8eb229cd64ba40 (patch) | |
tree | 5e353984aa06129bfba56cebfc05a3dd2c670a43 /client/src | |
parent | efee0cc6ae62e870e2419d3a7ac04f4647ebc752 (diff) |
[style] fixed do not assign a lambda in soledad client
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/leap/soledad/client/api.py | 6 | ||||
-rw-r--r-- | client/src/leap/soledad/client/examples/run_benchmark.py | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py index 6c9dce54..219be969 100644 --- a/client/src/leap/soledad/client/api.py +++ b/client/src/leap/soledad/client/api.py @@ -211,8 +211,10 @@ class Soledad(object): Initialize configuration using default values for missing params. """ soledad_assert_type(self._passphrase, unicode) - initialize = lambda attr, val: getattr( - self, attr, None) is None and setattr(self, attr, val) + + def initialize(attr, val): + return getattr(self, attr, None) is None and + setattr(self, attr, val) initialize("_secrets_path", os.path.join( self.default_prefix, self.secrets_file_name)) diff --git a/client/src/leap/soledad/client/examples/run_benchmark.py b/client/src/leap/soledad/client/examples/run_benchmark.py index a112cf45..61621e89 100644 --- a/client/src/leap/soledad/client/examples/run_benchmark.py +++ b/client/src/leap/soledad/client/examples/run_benchmark.py @@ -10,8 +10,9 @@ CSVFILE = 'bench.csv' cmd = "SILENT=1 TIMES={times} TMPDIR={tmpdir} python ./use_{version}api.py" -parse_time = lambda r: r.split('\n')[-1] +def parse_time(r): + return r.split('\n')[-1] with open(CSVFILE, 'w') as log: |