Skip to content

Commit 18690c2

Browse files
Merge pull request #107 from gleanwork/cfreeman/fix-sdkconfiguration-genignore
fix: make X-Glean hook resilient to SDK regeneration
2 parents 0ca4291 + bd14dc7 commit 18690c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/glean/api_client/_hooks/x_glean.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ def before_request(
4949
# Get deprecated value - env var takes precedence
5050
deprecated_value = _get_first_value(
5151
os.environ.get("X_GLEAN_EXCLUDE_DEPRECATED_AFTER"),
52-
hook_ctx.config.exclude_deprecated_after,
52+
getattr(hook_ctx.config, "exclude_deprecated_after", None),
5353
)
5454

5555
# Get experimental value - env var takes precedence
5656
config_experimental = (
57-
"true" if hook_ctx.config.include_experimental is True else None
57+
"true" if getattr(hook_ctx.config, "include_experimental", None) is True else None
5858
)
5959
experimental_value = _get_first_value(
6060
os.environ.get("X_GLEAN_INCLUDE_EXPERIMENTAL"),

0 commit comments

Comments
 (0)