Browse Source

Fixed multiline bug introduced in 925cbb2297643b27e2419e344efe3c5d274715b0 (brown paper bag, please)

Sven Velt 8 years ago
parent
commit
2e4754e1ac
1 changed files with 4 additions and 1 deletions
  1. 4 1
      monitoringplugin.py

+ 4 - 1
monitoringplugin.py

@@ -405,7 +405,10 @@ class MonitoringPlugin(object):
 			if type(multiline) == str:
 				out += '\n' + multiline.replace('|', ' ')
 			elif type(multiline) in [list, tuple]:
-				out += '\n' + '\n'.join([item for sublist in multiline for item in sublist]).replace('|', ' ')
+				if type(multiline[0]) in [list, tuple]:
+					out += '\n' + '\n'.join([item for sublist in multiline for item in sublist]).replace('|', ' ')
+				else:
+					out += '\n' + '\n'.join(multiline).replace('|', ' ')
 
 		# Check if there's perfdata
 		if performancedata: