From fa3b0fefbfef20c82f303b26e8fc7c955a26426a Mon Sep 17 00:00:00 2001 From: Alexis Delhaie Date: Mon, 5 Oct 2020 18:53:53 +0200 Subject: [PATCH] Fix printing --- src/main.py | 2 +- src/thread.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.py b/src/main.py index 3ad30a3..3cd1ada 100644 --- a/src/main.py +++ b/src/main.py @@ -12,7 +12,7 @@ import thread import basic_producer_consumer console = Console(highlight=False) -VERSION = "1.3" +VERSION = "1.3.1" thread.console = console def main(): diff --git a/src/thread.py b/src/thread.py index bf3c452..23e4095 100644 --- a/src/thread.py +++ b/src/thread.py @@ -26,7 +26,7 @@ class StressThread (threading.Thread): def run(self): try: - print("Request {}: GET on {}".format(self.n, self.path)) + console.print("Request {}: GET on {}".format(self.n, self.path)) now = time.time() if self.allow_ssl: if self.self_signed: @@ -45,7 +45,7 @@ class StressThread (threading.Thread): self.success = True except Exception as e: console.print("Request {}: [bold red]{}[/]".format(self.n, e)) - print() + console.print() def is_succeeded(self): return self.success