@@ -609,28 +609,27 @@ def _read_stream(self, watcher, stream, name):
609609 # Object is either added or modified. Check the status and determine if we
610610 # should continue waiting
611611 if hasattr (obj , 'status' ):
612- status = getattr (obj , 'status' )
613- if hasattr (status , 'phase' ):
614- if status .phase == 'Active' :
612+ if hasattr (obj .status , 'phase' ):
613+ if obj .status .phase == 'Active' :
615614 # TODO other phase values ??
616615 # TODO test namespaces for OpenShift annotations if needed
617616 return_obj = obj
618617 watcher .stop ()
619618 break
620- elif hasattr (status , 'conditions' ):
621- conditions = getattr ( status , ' conditions' )
619+ elif hasattr (obj . status , 'conditions' ):
620+ conditions = obj . status . conditions
622621 if conditions and len (conditions ) > 0 :
623622 # We know there is a status, but it's up to the user to determine meaning.
624623 return_obj = obj
625624 watcher .stop ()
626625 break
627- elif obj .kind == 'Service' and status is not None :
626+ elif obj .kind == 'Service' and obj . status is not None :
628627 return_obj = obj
629628 watcher .stop ()
630629 break
631630 elif obj .kind == 'Route' :
632631 route_statuses = set ()
633- for route_ingress in status .ingress :
632+ for route_ingress in obj . status .ingress :
634633 for condition in route_ingress .conditions :
635634 route_statuses .add (condition .type )
636635 if route_statuses <= {'Ready' , 'Admitted' }:
0 commit comments