From 95a9a456041d4f90a2c14f55dd5d3bd25eba5344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Sun, 31 Jul 2011 18:22:58 +0200 Subject: [PATCH] Fixed remote store race condition --- darc/remote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/darc/remote.py b/darc/remote.py index 1d31186ff..fcd4ee45f 100644 --- a/darc/remote.py +++ b/darc/remote.py @@ -111,8 +111,8 @@ def __init__(self, location, create=False): def wait(self, write=True): with self.channel.lock: if ((not write or self.channel.out_window_size == 0) and - not self.channel.recv_ready() and - not self.channel.recv_stderr_ready()): + len(self.channel.in_buffer._buffer) == 0 and + len(self.channel.in_stderr_buffer._buffer) == 0): self.channel.out_buffer_cv.wait(10) def cmd(self, cmd, args, callback=None, callback_data=None):