Migration follow up patch 1
- fix format alignment if column is empty
Change-Id: I0f4eda95a8dd1ee7d7029c04a0ae9b8cc2a3dcc4
Related-PROD: PROD-34664
diff --git a/cfg_checker/modules/network/mapper.py b/cfg_checker/modules/network/mapper.py
index 59f3781..483c11f 100644
--- a/cfg_checker/modules/network/mapper.py
+++ b/cfg_checker/modules/network/mapper.py
@@ -395,7 +395,8 @@
for idx_y in range(m):
line = ""
for idx_x in range(n):
- _fmt = "{" + ":{}".format(_columns[idx_x]) + "} "
+ _len = _columns[idx_x] if _columns[idx_x] else 1
+ _fmt = "{" + ":{}".format(_len) + "} "
line += _fmt.format(matrix[idx_x][idx_y])
lines.append(line)
node_data['networks'][_ifname]['matrix'] = matrix