Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ocp_resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import kubernetes
import yaml
from kubernetes.dynamic.exceptions import MethodNotAllowedError
from kubernetes.dynamic.exceptions import ForbiddenError, MethodNotAllowedError
from openshift.dynamic import DynamicClient
from openshift.dynamic.exceptions import (
ConflictError,
Expand Down Expand Up @@ -681,8 +681,8 @@ def create(self, wait=False):
resource_ = self.api.create(
body=self.res, namespace=self.namespace, dry_run=self.dry_run
)
with contextlib.suppress(NotFoundError):
# some resources do not support get() (no instance)
with contextlib.suppress(NotFoundError, ForbiddenError):
# some resources do not support get() (no instance) or the client do not have permissions
self.initial_resource_version = self.instance.metadata.resourceVersion

if wait and resource_:
Expand Down