Skip to content

Commit

Permalink
handling lack of torc more gracefully
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Haigh <[email protected]>
  • Loading branch information
MichaelHaigh committed Dec 7, 2023
1 parent 747b963 commit e2d614e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tkSrc/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def main(args, parser, ard):
torc = astraSDK.k8s.getResources().main(
"tridentorchestrators", version="v1", group="trident.netapp.io"
)
if len(torc["items"]) == 0:
if torc is None or len(torc["items"]) == 0:
parser.error("trident operator not found on current Kubernetes context")
elif len(torc["items"]) > 1:
parser.error("multiple trident operators found on current Kubernetes context")
Expand Down

0 comments on commit e2d614e

Please sign in to comment.