Commit b024ca62 authored by arthur-zzz's avatar arthur-zzz Committed by Andrey Vertiprahov
Browse files

Fix format_table

parent 80cbe7d7
# ---------------------------------------------------------------------
# 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