fix: fix sysexit with custom error (#703)

This commit is contained in:
Robert Kaussow 2024-06-02 00:08:25 +02:00 committed by GitHub
parent 4051d2915d
commit 89c6a11be4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class Generator:
os.makedirs(directory, exist_ok=True)
self.logger.info(f"Creating dir: {directory}")
except FileExistsError as e:
self.log.sysexit_with_message(str(e))
self.log.sysexit_with_message(e)
def _write_doc(self):
files_to_overwite = []

View File

@ -287,7 +287,7 @@ class Log:
sys.exit(code)
def sysexit_with_message(self, msg, code=1):
self.logger.critical(str(msg.strip()))
self.logger.critical(str(msg).strip())
self.sysexit(code)