Skip to content

Commit

Permalink
Make the hack a tad less hacky
Browse files Browse the repository at this point in the history
  • Loading branch information
DubiousCactus committed Jul 28, 2024
1 parent d162112 commit f9740c5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bootstrap/tui/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ def on_mount(self):
self.begin_capture_print()

def on_print(self, event: Print) -> None:
self.wite(event.text, event.stderr)
if event.text.strip() != "":
# FIXME: Why do we need this hack?!
self.wite(event.text, event.stderr)

def wite(self, message: Any, is_stderr: bool):
if isinstance(message, str) and message.strip() == "":
# FIXME: Why do we need this hack?!
return
logger: RichLog = self.query_one(RichLog)
if isinstance(message, (RenderableType, str)):
logger.write(
Expand Down

0 comments on commit f9740c5

Please sign in to comment.