Skip to content

Commit

Permalink
Adding a bug fix for plugin setting access (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
travishathaway authored Jan 9, 2025
1 parent d908249 commit cc6cfbc
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions conda_anaconda_telemetry/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,11 @@ def _conda_request_headers() -> Sequence[HeaderWrapper]:
@hookimpl
def conda_session_headers(host: str) -> Iterator[CondaRequestHeader]:
"""Return a list of custom headers to be included in the request."""
if context.plugins.anaconda_telemetry:
try:
if host in REQUEST_HEADER_HOSTS:
yield from validate_headers(_conda_request_headers())
except Exception as exc:
logger.debug("Failed to collect telemetry data", exc_info=exc)
try:
if context.plugins.anaconda_telemetry and host in REQUEST_HEADER_HOSTS:
yield from validate_headers(_conda_request_headers())
except Exception as exc:
logger.debug("Failed to collect telemetry data", exc_info=exc)


@hookimpl
Expand Down

0 comments on commit cc6cfbc

Please sign in to comment.