summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2016-11-16 23:05:07 -0300
committerVictor Shyba <victor1984@riseup.net>2016-11-18 15:55:52 -0300
commit358874c8210dc779cea73b72e54934ae627c5711 (patch)
treeac44f9da58dcc179ea648c035141514935ba2949
parent2443ae74bf873a58393f6f721438378f74bcb9d7 (diff)
[refactor] better naming for producer calling
Giving the proper name to the function and arguments helps to make the producer wizardry less magic.
-rw-r--r--client/src/leap/soledad/client/http_target/send_protocol.py3
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