mirror of
https://github.com/ceph/ceph
synced 2025-01-12 06:00:46 +00:00
tasks/cephfs: fix raising from RemoteProcess.wait()
...in the case where we call wait() on an already-finished process. Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
55a04930e3
commit
fb2e38f2df
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user