mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-13 06:34:45 -04:00
Improve NonStreamable.print_msg performance
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
07d0df382b
commit
4f99b62f25
1 changed files with 7 additions and 4 deletions
|
@ -35,13 +35,16 @@ class NonStreamable(Exception):
|
|||
print(self.print_msg(item))
|
||||
|
||||
def print_msg(self, item) -> str:
|
||||
base_msg = click.style(f"Unable to stream {item!s}.", fg="yellow")
|
||||
base_msg = [click.style(f"Unable to stream {item!s}.", fg="yellow")]
|
||||
if self.message:
|
||||
base_msg += click.style(" Message: ", fg="yellow") + click.style(
|
||||
self.message, fg="red"
|
||||
base_msg.extend(
|
||||
(
|
||||
click.style("Message:", fg="yellow"),
|
||||
click.style(self.message, fg="red"),
|
||||
)
|
||||
)
|
||||
|
||||
return base_msg
|
||||
return " ".join(base_msg)
|
||||
|
||||
|
||||
class InvalidContainerError(Exception):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue