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:
John Spray 2015-12-08 16:28:34 +00:00
parent 55a04930e3
commit fb2e38f2df

View File

@ -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)