diff --git a/openshift/helper/base.py b/openshift/helper/base.py index cf52e864..67a1c80c 100644 --- a/openshift/helper/base.py +++ b/openshift/helper/base.py @@ -185,7 +185,12 @@ def get_object(self, name, namespace=None): def patch_object(self, name, namespace, k8s_obj): self.logger.debug('Starting patch object') - empty_status = self.properties['status']['class']() + + if 'status' in self.properties['status']: + empty_status = self.properties['status']['class']() + else: + empty_status = {} + k8s_obj.status = empty_status k8s_obj.metadata.resource_version = None self.__remove_creation_timestamps(k8s_obj) @@ -499,6 +504,8 @@ def _wait_for_response(self, name, namespace, action): if action == 'delete': if not obj: break + elif obj and not hasattr(obj, 'status'): + break elif obj and obj.status and hasattr(obj.status, 'phase'): if obj.status.phase == 'Active': break