diff options
author | Victor Shyba <victor1984@riseup.net> | 2016-11-16 23:05:07 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2016-11-18 15:55:52 -0300 |
commit | 358874c8210dc779cea73b72e54934ae627c5711 (patch) | |
tree | ac44f9da58dcc179ea648c035141514935ba2949 /client/src/leap | |
parent | 2443ae74bf873a58393f6f721438378f74bcb9d7 (diff) |
[refactor] better naming for producer calling
Giving the proper name to the function and arguments helps to make the
producer wizardry less magic.
Diffstat (limited to 'client/src/leap')
-rw-r--r-- | client/src/leap/soledad/client/http_target/send_protocol.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/http_target/send_protocol.py b/client/src/leap/soledad/client/http_target/send_protocol.py index 63ce6b42..0cb6d039 100644 --- a/client/src/leap/soledad/client/http_target/send_protocol.py +++ b/client/src/leap/soledad/client/http_target/send_protocol.py @@ -56,7 +56,8 @@ class DocStreamProducer(object): yield self.sleep(0.001) continue call = self.producer.pop(0) - yield call[0](*call[1:]) + fun, args = call[0], call[1:] + yield fun(*args) consumer.write(self.body.pop(1, leave_open=True)) consumer.write(self.body.pop(0)) # close stream |