MCPcopy Create free account
hub / github.com/apache/mesos / add_row

Method add_row

src/python/cli_new/lib/cli/util.py:332–345  ·  view source on GitHub ↗

Add a row to the table. Input must be a list where each entry corresponds to its respective column in order.

(self, row)

Source from the content-addressed store, hash-verified

330 return (len(self.table), len(self.table[0]))
331
332 def add_row(self, row):
333 """
334 Add a row to the table. Input must be a list where each entry
335 corresponds to its respective column in order.
336 """
337 if len(row) != len(self.table[0]):
338 raise CLIException("Number of entries and columns do not match!")
339
340 # Adjust padding for each column.
341 for index, elem in enumerate(row):
342 if len(elem) > self.padding[index]:
343 self.padding[index] = len(elem)
344
345 self.table.append(row)
346
347 def __str__(self):
348 """

Callers 4

parseMethod · 0.95
listMethod · 0.95
listMethod · 0.95
pluginsMethod · 0.95

Calls 2

CLIExceptionClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected