From 21082cec40f344a62e9fcd75b1e7f5c156d7b71b Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 22 Apr 2018 04:04:58 +0100 Subject: [PATCH] ansible: fix ugly formatting. --- ansible_mitogen/services.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ansible_mitogen/services.py b/ansible_mitogen/services.py index 9d94ed18..9ed95b4d 100644 --- a/ansible_mitogen/services.py +++ b/ansible_mitogen/services.py @@ -575,8 +575,6 @@ class FileService(mitogen.service.Service): raise mitogen.core.CallError(self.unregistered_msg) LOG.debug('Serving %r', path) - self._queue.put(( - sender, - open(path, 'rb', mitogen.core.CHUNK_SIZE), - )) + fp = open(path, 'rb', mitogen.core.CHUNK_SIZE) + self._queue.put((sender, fp)) return self._size_by_path[path]