Skip to content

Commit

Permalink
Fixed some things relating to initialisation of telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-turner-1 committed Jan 22, 2025
1 parent 9643c17 commit a13e5b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/access_nri_intake/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

try:
data = intake.open_catalog(get_catalog_fp()).access_nri
cat_version = data._captured_init_kwargs.get("metadata", {}).get(
"version", "latest"
) # Get the catalog version number and set it to "latest" if it can't be found
except FileNotFoundError:
warnings.warn(
"Unable to access a default catalog location. Calling intake.cat.access_nri will not work.",
Expand All @@ -31,5 +28,8 @@
)
data = intake.catalog.Catalog()
finally:
cat_version = data._captured_init_kwargs.get("metadata", {}).get(
"version", "latest"
) # Get the catalog version number and set it to "latest" if it can't be found
configure_telemetry(["--enable", "--silent"])
api_handler.add_extra_field("catalog", {"catalog_version": cat_version})
api_handler.add_extra_fields("intake_catalog", {"catalog_version": cat_version})

0 comments on commit a13e5b8

Please sign in to comment.