From 3855740b6331055dd7e832ce987abb18695e887f Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 1 Nov 2023 19:59:13 -0700 Subject: [PATCH] google-calendar: Exit on fatal errors. Signed-off-by: Anders Kaseorg --- zulip/integrations/google/google-calendar | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zulip/integrations/google/google-calendar b/zulip/integrations/google/google-calendar index e36e9fa4..37879f77 100755 --- a/zulip/integrations/google/google-calendar +++ b/zulip/integrations/google/google-calendar @@ -21,6 +21,7 @@ try: from googleapiclient import discovery except ImportError: logging.exception("Install google-api-python-client") + sys.exit(1) sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) import zulip @@ -106,8 +107,10 @@ def get_credentials() -> client.Credentials: return credentials except client.Error: logging.exception("Error while trying to open the `google-credentials.json` file.") + sys.exit(1) except OSError: logging.error("Run the get-google-credentials script from this directory first.") + sys.exit(1) def populate_events() -> Optional[None]: