From 1be8f24264d7c0e9c8616faa64c206954fa5c342 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 16 Nov 2016 23:05:07 -0300 Subject: [refactor] better naming for producer calling Giving the proper name to the function and arguments helps to make the producer wizardry less magic. --- client/src/leap/soledad/client/http_target/send_protocol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client/src') 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 -- cgit v1.2.3