Skip to content

Commit

Permalink
Improve Example Code to Correctly Error Out when OP_SERVICE_ACCOUNT_T…
Browse files Browse the repository at this point in the history
…OKEN is not set. (#95)

* Fix example to correctly show error when OP_SERVICE_ACCOUNT_TOKEN is not set

* Revert example.py change and add it to client.py

* Remove optional from auth and add it directly to the new_defualt_config

* Remove unnecessary import

* Remove unnecessary comment addition
  • Loading branch information
MOmarMiraj authored Aug 29, 2024
1 parent 871fc7f commit 570b4bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/onepassword/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ class Client:

@classmethod
async def authenticate(cls, auth, integration_name, integration_version):
# Convert None from os.getEnv to empty string
config = new_default_config(
auth=auth,
auth=auth or "",
integration_name=integration_name,
integration_version=integration_version,
)
Expand Down

0 comments on commit 570b4bb

Please sign in to comment.