From 859427253903bdd55500cbc54097092baacec890 Mon Sep 17 00:00:00 2001 From: David Davis Date: Fri, 12 Jul 2024 10:00:39 -0400 Subject: [PATCH] Fix AttributeError when PULP_OTEL_ENABLED is unset Fix `AttributeError: 'NoneType' object has no attribute 'lower'` when `PULP_OTEL_ENABLED` is not set. [noissue] --- pulpcore/tasking/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulpcore/tasking/worker.py b/pulpcore/tasking/worker.py index 933e8b5acb..9a69b4d99e 100644 --- a/pulpcore/tasking/worker.py +++ b/pulpcore/tasking/worker.py @@ -420,7 +420,7 @@ def handle_available_tasks(self): self.supervise_task(task) def record_unblocked_waiting_tasks_metric(self): - if os.getenv("PULP_OTEL_ENABLED").lower() != "true": + if os.getenv("PULP_OTEL_ENABLED", "").lower() != "true": return now = timezone.now()