8000 Handing None for AppCredentials in _get_or_create_connector_client · RobStand/botbuilder-python@4ddc647 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ddc647

Browse files
committed
Handing None for AppCredentials in _get_or_create_connector_client
1 parent cca8553 commit 4ddc647

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,15 +1055,15 @@ async def create_connector_client(
10551055
def _get_or_create_connector_client(
10561056
self, service_url: str, credentials: AppCredentials
10571057
) -> ConnectorClient:
1058+
if not credentials:
1059+
credentials = MicrosoftAppCredentials.empty()
1060+
10581061
# Get ConnectorClient from cache or create.
10591062
client_key = BotFrameworkAdapter.key_for_connector_client(
10601063
service_url, credentials.microsoft_app_id, credentials.oauth_scope
10611064
)
10621065
client = self._connector_client_cache.get(client_key)
10631066
if not client:
1064-
if not credentials:
1065-
credentials = MicrosoftAppCredentials.empty()
1066-
10671067
client = ConnectorClient(credentials, base_url=service_url)
10681068
client.config.add_user_agent(USER_AGENT)
10691069
self._connector_client_cache[client_key] = client

0 commit comments

Comments
 (0)
0