orchestra: fix ConnectionLostError path in wait()

Sometimes it would generate AttributeError instead
when it tried to call is_active() on None.

Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
John Spray 2014-09-16 14:08:41 +01:00
parent 23add3a09f
commit 24699f92c2

View File

@ -90,7 +90,7 @@ class RemoteProcess(object):
# command either died due to a signal, or the connection
# was lost
transport = self.client.get_transport()
if not transport.is_active():
if transport is None or not transport.is_active():
# look like we lost the connection
raise ConnectionLostError(command=self.command)