From 8757836558c89743356fd1e95ea0d8d3647506ce Mon Sep 17 00:00:00 2001 From: Prajith Ndz Date: Sat, 13 Feb 2021 19:07:38 +0530 Subject: [PATCH] address comment --- handlers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/handlers.py b/handlers.py index f5a7a27..a6fd7aa 100644 --- a/handlers.py +++ b/handlers.py @@ -2,11 +2,8 @@ import kubernetes import os -WATCH_NAMESPACE = os.getenv('WATCH_NAMESPACE') -all_namespaces = [] -if WATCH_NAMESPACE is not None: - all_namespaces = WATCH_NAMESPACE.split(',') - +WATCH_NAMESPACE = os.getenv('WATCH_NAMESPACE', "") +all_namespaces = WATCH_NAMESPACE.split(',') def watch_namespace(namespace, **_): if WATCH_NAMESPACE == "" or namespace in all_namespaces: return True