From 6e9417a14967ee2102570d991c9bf8fe54d541a8 Mon Sep 17 00:00:00 2001 From: Tom Neuber Date: Sun, 5 Jan 2025 00:54:26 +0100 Subject: [PATCH] test --- main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 523d087..2e86881 100644 --- a/main.py +++ b/main.py @@ -95,9 +95,13 @@ def watch_crd(group, version, plural): logging.info(f"Watching {group}/{version}/{plural}") while True: - stream = watch.Watch().stream(crds.list_cluster_custom_object, - group=group, version=version, plural=plural, - resource_version=resource_version) + if resource_version != "": + stream = watch.Watch().stream(crds.list_cluster_custom_object, + group=group, version=version, plural=plural, + resource_version=resource_version) + else: + stream = watch.Watch().stream(crds.list_cluster_custom_object, + group=group, version=version, plural=plural) for event in stream: t = event["type"] obj = event["object"]