fix: [ModulesInformationV2] fix #244

pull/282/head
Terrtia 2018-09-19 15:45:06 +02:00
parent 5732d7b134
commit 2e763ba0aa
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 9 additions and 7 deletions

View File

@ -724,6 +724,7 @@ def format_string(tab, padding_row):
text="" text=""
for ite, elem in enumerate(the_array): for ite, elem in enumerate(the_array):
if elem is not None and type(elem) is str:
if len(elem) > padding_row[ite]: if len(elem) > padding_row[ite]:
text += "*" + elem[-padding_row[ite]+6:] text += "*" + elem[-padding_row[ite]+6:]
padd_off = " "*5 padd_off = " "*5
@ -731,6 +732,7 @@ def format_string(tab, padding_row):
text += elem text += elem
padd_off = " "*0 padd_off = " "*0
text += (padding_row[ite] - len(elem))*" " + padd_off text += (padding_row[ite] - len(elem))*" " + padd_off
printstring.append( (text, the_pid) ) printstring.append( (text, the_pid) )
return printstring return printstring