We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0830980 commit 003a078Copy full SHA for 003a078
src/mas/devops/ocp.py
@@ -66,15 +66,15 @@ def getNamespace(dynClient: DynamicClient, namespace: str) -> dict:
66
Get a namespace
67
"""
68
namespaceAPI = dynClient.resources.get(api_version="v1", kind="Namespace")
69
- namespace = {}
70
71
try:
72
- namespace = namespaceAPI.get(name=namespace)
+ ns = namespaceAPI.get(name=namespace)
73
logger.debug(f"Namespace {namespace} exists")
+ return ns
74
except NotFoundError:
75
logger.debug(f"Namespace {namespace} does not exist")
76
77
- return namespace
+ return {}
78
79
80
def createNamespace(dynClient: DynamicClient, namespace: str) -> bool:
0 commit comments