From 589ea06f15ec4800a86954b8e828e8e17ee0c168 Mon Sep 17 00:00:00 2001 From: Marina Golosova Date: Tue, 10 Jul 2018 16:26:51 +0300 Subject: [PATCH] pyDKB/logging: improve extra line formatting function. We do not need to align lines when there's no suffix at all. --- Utils/Dataflow/pyDKB/common/_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils/Dataflow/pyDKB/common/_logging.py b/Utils/Dataflow/pyDKB/common/_logging.py index 9adeb695b..8abb372a5 100644 --- a/Utils/Dataflow/pyDKB/common/_logging.py +++ b/Utils/Dataflow/pyDKB/common/_logging.py @@ -113,7 +113,7 @@ def formatExtra(self, lines, suffix=None, prefix=" (==) ", align=False): suffix = self._suffix if isinstance(lines, list) and len(lines): max_len = len(max(lines, key=len)) - if align: + if suffix and align: line_fmt = "%%(line)-%ds" % max_len else: line_fmt = "%(line)s"