mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-21 12:20:40 +00:00
fix: fix sysexit with custom error (#703)
This commit is contained in:
parent
4051d2915d
commit
89c6a11be4
@ -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 = []
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user