Skip to content

Commit

Permalink
Early exit if NM_DISABLE_ANALYTICS is set (#290)
Browse files Browse the repository at this point in the history
Ignore unrelated test failure
  • Loading branch information
bnellnm authored Apr 5, 2023
1 parent f6844b8 commit b060d3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sparsezoo/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ def analytics_disabled():
"""
:return: True if analytics should be disabled, False otherwise
"""
gdpr = is_gdpr_country()
env_disabled = os.getenv("NM_DISABLE_ANALYTICS")

return gdpr or env_disabled
return env_disabled or is_gdpr_country()


class GoogleAnalytics:
Expand Down

0 comments on commit b060d3e

Please sign in to comment.