Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tools/screenshots: Fix custom headers crash when using custom options.

Niloth P29ef4a05fee5
diff --git a/tools/screenshots/generate-integration-docs-screenshot b/tools/screenshots/generate-integration-docs-screenshot
index c8b1629397b..ada5cdb6354 100755
--- a/tools/screenshots/generate-integration-docs-screenshot
+++ b/tools/screenshots/generate-integration-docs-screenshot
@@ -172,7 +172,8 @@ def send_bot_payload_message(
data, json_fixture, fixture_name = get_fixture_info(fixture_path)
headers = get_requests_headers(integration.name, fixture_name)
- headers.update(config.custom_headers)
+ if config.custom_headers:
+ headers.update(config.custom_headers)
if config.use_basic_auth:
credentials = base64.b64encode(f"{bot.email}:{bot.api_key}".encode()).decode()
auth = f"basic {credentials}"