From fb2e38f2dfd52a5efa0a48b8836607e42102d303 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 8 Dec 2015 16:28:34 +0000 Subject: [PATCH] tasks/cephfs: fix raising from RemoteProcess.wait() ...in the case where we call wait() on an already-finished process. Signed-off-by: John Spray --- tasks/cephfs/vstart_runner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/cephfs/vstart_runner.py b/tasks/cephfs/vstart_runner.py index 579e11d6bf2..3b90afb78de 100644 --- a/tasks/cephfs/vstart_runner.py +++ b/tasks/cephfs/vstart_runner.py @@ -92,7 +92,10 @@ class LocalRemoteProcess(object): if self.finished: # Avoid calling communicate() on a dead process because it'll # give you stick about std* already being closed - return + if self.exitstatus != 0: + raise CommandFailedError(self.args, self.exitstatus) + else: + return out, err = self.subproc.communicate() self.stdout.write(out)