Skip to content

Commit 2b11e8b

Browse files
author
Zhi Zhou
committed
Fix a bug when using subscription_key
1 parent b5baac0 commit 2b11e8b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/content_understanding_face_client.py

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

3233
def _get_face_url(self, endpoint, api_version, action):
3334
return (

0 commit comments

Comments
 (0)