Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rogue breakpoint() calls #49

Closed
simonw opened this issue Apr 27, 2024 · 0 comments
Closed

Rogue breakpoint() calls #49

simonw opened this issue Apr 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@simonw
Copy link
Collaborator

simonw commented Apr 27, 2024

I think I may have left some breakpoint() calls in there!

async def get_secret(self, datasette: "Datasette", config: dict):
if self.secret is None:
breakpoint()
raise SecretError("No secret defined for this enrichment")
secret = await get_secret(datasette, self.secret.name)
if secret is not None:
return secret
# Try the stashed secrets instead
if not hasattr(datasette, "_enrichments_stashed_secrets"):
breakpoint()
raise SecretError("No secrets have been stashed")
stashed_keys = datasette._enrichments_stashed_secrets
stash_key = config.get("enrichment_secret")
if stash_key not in stashed_keys:
breakpoint()
raise SecretError(
"No secret found in stash for {}".format(self.secret.name)
)
return stashed_keys[stash_key]

Originally posted by @simonw in datasette/datasette-enrichments-gpt#11 (comment)

@simonw simonw added bug Something isn't working good first issue Good for newcomers and removed good first issue Good for newcomers labels Apr 27, 2024
@simonw simonw closed this as completed in adbfaeb Apr 27, 2024
simonw added a commit that referenced this issue Apr 27, 2024
simonw added a commit to datasette/datasette-enrichments-gpt that referenced this issue Apr 27, 2024
simonw added a commit to datasette/datasette-enrichments-gpt that referenced this issue Apr 27, 2024
* datasette-secrets integration, closes #9

* Upgrade to datasette-enrichments>=0.4.1

Refs datasette/datasette-enrichments#49

* Test against Python 3.12 and both Datasette major versions

* Documentation for datasette-secrets configuration, refs #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant