Fix printing

This commit is contained in:
Alexis Delhaie
2020-10-05 18:53:53 +02:00
parent a11ac091d5
commit fa3b0fefbf
2 changed files with 3 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ import thread
import basic_producer_consumer import basic_producer_consumer
console = Console(highlight=False) console = Console(highlight=False)
VERSION = "1.3" VERSION = "1.3.1"
thread.console = console thread.console = console
def main(): def main():

View File

@@ -26,7 +26,7 @@ class StressThread (threading.Thread):
def run(self): def run(self):
try: try:
print("Request {}: GET on {}".format(self.n, self.path)) console.print("Request {}: GET on {}".format(self.n, self.path))
now = time.time() now = time.time()
if self.allow_ssl: if self.allow_ssl:
if self.self_signed: if self.self_signed:
@@ -45,7 +45,7 @@ class StressThread (threading.Thread):
self.success = True self.success = True
except Exception as e: except Exception as e:
console.print("Request {}: [bold red]{}[/]".format(self.n, e)) console.print("Request {}: [bold red]{}[/]".format(self.n, e))
print() console.print()
def is_succeeded(self): def is_succeeded(self):
return self.success return self.success