Skip to content

Commit

Permalink
fix: fix sysexit with custom error (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Jun 1, 2024
1 parent 4051d29 commit 89c6a11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansibledoctor/doc_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _create_dir(self, directory):
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 = []
Expand Down
2 changes: 1 addition & 1 deletion ansibledoctor/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def sysexit(self, code=1):
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)


Expand Down

0 comments on commit 89c6a11

Please sign in to comment.