Skip to content

Commit c7104e6

Browse files
author
Zhi Zhou
committed
Fix the same bug in content_understanding_client
1 parent 2b11e8b commit c7104e6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/content_understanding_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ def __init__(
2727
self._endpoint = endpoint.rstrip("/")
2828
self._api_version = api_version
2929
self._logger = logging.getLogger(__name__)
30-
self._headers = self._get_headers(
31-
subscription_key, token_provider(), x_ms_useragent
32-
)
30+
31+
token = token_provider() if token_provider else None
32+
33+
self._headers = self._get_headers(subscription_key, token, x_ms_useragent)
3334

3435
def _get_analyzer_url(self, endpoint, api_version, analyzer_id):
3536
return f"{endpoint}/contentunderstanding/analyzers/{analyzer_id}?api-version={api_version}" # noqa

0 commit comments

Comments
 (0)