Skip to content

Commit 570b4bb

Browse files
authored
Improve Example Code to Correctly Error Out when OP_SERVICE_ACCOUNT_TOKEN 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
1 parent 871fc7f commit 570b4bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/onepassword/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ class Client:
1414

1515
@classmethod
1616
async def authenticate(cls, auth, integration_name, integration_version):
17+
# Convert None from os.getEnv to empty string
1718
config = new_default_config(
18-
auth=auth,
19+
auth=auth or "",
1920
integration_name=integration_name,
2021
integration_version=integration_version,
2122
)

0 commit comments

Comments
 (0)