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.

generate-integration-docs-screenshot: Handle incorrect fixture_name.

Niloth P88e92d050c8d
diff --git a/tools/screenshots/generate-integration-docs-screenshot b/tools/screenshots/generate-integration-docs-screenshot
index da7680da134..bacde015f76 100755
--- a/tools/screenshots/generate-integration-docs-screenshot
+++ b/tools/screenshots/generate-integration-docs-screenshot
@@ -100,6 +100,10 @@ def get_fixture_info(fixture_path: str) -> tuple[Any, bool, bool, str]:
_, fixture_name = split_fixture_path(fixture_path)
if fixture_name:
+ if not os.path.exists(fixture_path):
+ raise FileNotFoundError(
+ f"{BOLDRED}The fixture '{fixture_path}' does not exist. Please check the fixture file name and try again.{ENDC}"
+ )
if json_fixture:
with open(fixture_path, "rb") as fb:
data = orjson.loads(fb.read())