From bff9ebc67428de7e50db33d17e53be5d4d57dd51 Mon Sep 17 00:00:00 2001 From: Wainer Vandelli <Wainer.Vandelli@cern.ch> Date: Fri, 17 Feb 2012 08:58:13 +0000 Subject: [PATCH] Long dir listing on castor might block due to filling up of stdout buffer --- Script/castorstorage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Script/castorstorage.py b/Script/castorstorage.py index 0c1db30..f3c2efc 100644 --- a/Script/castorstorage.py +++ b/Script/castorstorage.py @@ -91,8 +91,9 @@ def listdir(directory, stager, pool, logger=None): nsls = Popen(['nsls', directory], stdout=PIPE, stderr=STDOUT, env=_castorenv(stager,pool)) + nslsOut,_ = nsls.communicate() ret = nsls.wait() - nslsOut = nsls.stdout.read() + if logger: logInfo = {'file':logger.findCaller()[0], -- GitLab