From 57e8fe2b8af173ee3f733da53a7854ec662719d3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 10 Feb 2022 21:28:48 +0100 Subject: [PATCH] need bracket for correct evaluation --- python/damask/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/util.py b/python/damask/util.py index fc3f8ea8f..87b15b4c3 100644 --- a/python/damask/util.py +++ b/python/damask/util.py @@ -763,7 +763,7 @@ class ProgressBar: fraction = (iteration+1) / self.total - if filled_length := int(self.bar_length * fraction) > int(self.bar_length * self.fraction_last) or \ + if (filled_length := int(self.bar_length * fraction)) > int(self.bar_length * self.fraction_last) or \ datetime.datetime.now() - self.time_last_update > datetime.timedelta(seconds=10): self.time_last_update = datetime.datetime.now() bar = '█' * filled_length + '░' * (self.bar_length - filled_length)