Skip to content

Commit

Permalink
pyDKB/logging: improve extra line formatting function.
Browse files Browse the repository at this point in the history
We do not need to align lines when there's no suffix at all.
  • Loading branch information
mgolosova committed Jul 11, 2018
1 parent 2d29dfa commit 589ea06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Utils/Dataflow/pyDKB/common/_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 589ea06

Please sign in to comment.