From 8ffb9121c4f9d59a7e43f59fd1bbb1a11ebaa8b5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:23:53 +0700 Subject: [PATCH] Use `sys.exit()` calls (#11) * Use `sys.exit()` calls * Format code with black and isort Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- misskaty/vars.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misskaty/vars.py b/misskaty/vars.py index d1bce8a8..4b8c5da3 100644 --- a/misskaty/vars.py +++ b/misskaty/vars.py @@ -1,3 +1,4 @@ +import sys from logging import getLogger from os import environ @@ -26,7 +27,7 @@ try: USER_SESSION = getConfig("USER_SESSION") except Exception as e: LOGGER.error(f"One or more env variables missing! Exiting now.\n{e}") - exit(1) + sys.exit(1) COMMAND_HANDLER = environ.get("COMMAND_HANDLER", "! /").split() SUDO = list( {