mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Fix gathered output with non-rectangular geometry
If we don't have a nice rectangular count of systems, the last row must tolerate index error in column.
This commit is contained in:
parent
8ee3630aa1
commit
2ef2e4d039
@ -69,8 +69,11 @@ class ScreenPrinter(object):
|
||||
columns = [self.nodelist[x:x+currheight] for x in range(0, len(self.nodelist), currheight)]
|
||||
for currow in range(0, len(columns[0])):
|
||||
for col in columns:
|
||||
node = col[currow]
|
||||
sys.stdout.write(fieldformat.format(node, self.nodeoutput[node]))
|
||||
try:
|
||||
node = col[currow]
|
||||
sys.stdout.write(fieldformat.format(node, self.nodeoutput[node]))
|
||||
except IndexError:
|
||||
break
|
||||
sys.stdout.write('\n')
|
||||
else:
|
||||
for node in self.nodelist:
|
||||
|
Loading…
Reference in New Issue
Block a user