Commit cf164eb6 authored by arthur-zzz's avatar arthur-zzz
Browse files

just use str

parent 3da2c9ef
Pipeline #34278 passed with stages
in 27 minutes and 17 seconds
......@@ -12,9 +12,6 @@ from itertools import zip_longest
# Third-party modules
from typing import List, Union, Iterable
# NOC modules
from noc.core.comp import smart_text
rx_header_start = re.compile(r"^\s*[-=]+[\s\+]+[-=]+")
rx_col = re.compile(r"^([\s\+]*)([\-]+|[=]+)")
......@@ -533,7 +530,7 @@ def format_table(widths, data, sep=" ", hsep=" "):
# Calculate column widths
widths = list(widths)
for row in data:
widths = [max(x, len(smart_text(y, errors="replace"))) 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