Skip to content

Commit 3855740

Browse files
committed
google-calendar: Exit on fatal errors.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 8fc924c commit 3855740

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

zulip/integrations/google/google-calendar

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ try:
2121
from googleapiclient import discovery
2222
except ImportError:
2323
logging.exception("Install google-api-python-client")
24+
sys.exit(1)
2425

2526
sys.path.append(os.path.join(os.path.dirname(__file__), "../../"))
2627
import zulip
@@ -106,8 +107,10 @@ def get_credentials() -> client.Credentials:
106107
return credentials
107108
except client.Error:
108109
logging.exception("Error while trying to open the `google-credentials.json` file.")
110+
sys.exit(1)
109111
except OSError:
110112
logging.error("Run the get-google-credentials script from this directory first.")
113+
sys.exit(1)
111114

112115

113116
def populate_events() -> Optional[None]:

0 commit comments

Comments
 (0)