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