From d9610abae0aadd81672d1c7d04c36f4b2b5d0832 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Thu, 15 Aug 2019 23:56:55 -0400 Subject: [PATCH] fixed thread-unsafe printing --- bin/anime4k.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/anime4k.py b/bin/anime4k.py index fe07f6b..5f992eb 100644 --- a/bin/anime4k.py +++ b/bin/anime4k.py @@ -76,7 +76,9 @@ class Anime4k: if locals()[arg] is not None: execute.extend([locals([arg])]) - Avalon.debug_info(f'Executing: {execute}') + self.print_lock.acquire() + Avalon.debug_info(f'Executing: {execute}', ) + self.print_lock.release() return_value += subprocess.run(execute, check=True).returncode # print thread exiting message