Commit 92081cae authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'arthur-zzz-master-patch-52971' into 'master'

Fix format_table

See merge request !5893
parents 80cbe7d7 b024ca62
Pipeline #34280 passed with stages
in 63 minutes and 2 seconds
# ---------------------------------------------------------------------
# Various text-processing utilities
# ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
......@@ -530,7 +530,7 @@ def format_table(widths, data, sep=" ", hsep=" "):
# Calculate column widths
widths = list(widths)
for row in data:
widths = [max(x, len(y)) for x, y in zip(widths, row)]
widths = [max(x, len(str(y))) for x, y in zip(widths, row)]
# Build print mask
mask = sep.join("%%-%ds" % w for w in widths)
out = [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment