Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zagy committed Dec 16, 2024
1 parent 944bafb commit dc697c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/batou/remote_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ def flush_buffer(self):
def line(self, message, debug=False, icon=None, **format):
if debug and not self.enable_debug:
return
if icon:
if icon is None:
icon = f"{icon} "
else:
icon = " "
self.flush_buffer()
self.backend.line(f"{icon}{message}", **format)
self.backend.line(f"{icon}{message}", icon="", **format)

def annotate(self, message, debug=False, icon=None, **format):
if debug and not self.enable_debug:
Expand Down
4 changes: 2 additions & 2 deletions src/batou/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,12 @@ def format_duration(duration: Optional[float]) -> str:
```
format_duration(1.23124) == "1.23s"
format_duration(61) == "1m1s"
format_duration(None) == "NaN"
format_duration(None) == ""
```
"""

if duration is None:
return "NaN"
return ""

minutes, seconds = divmod(duration, 60)

Expand Down

0 comments on commit dc697c6

Please sign in to comment.