Skip to content

Commit

Permalink
Fix AttributeError when PULP_OTEL_ENABLED is unset
Browse files Browse the repository at this point in the history
Fix `AttributeError: 'NoneType' object has no attribute 'lower'` when
`PULP_OTEL_ENABLED` is not set.

[noissue]
  • Loading branch information
daviddavis authored and lubosmj committed Jul 12, 2024
1 parent e2537df commit 8594272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulpcore/tasking/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8594272

Please sign in to comment.