diff --git a/MyMonPlugin/monitoringplugin.py b/MyMonPlugin/monitoringplugin.py index cd4c8a7..88027b9 100644 --- a/MyMonPlugin/monitoringplugin.py +++ b/MyMonPlugin/monitoringplugin.py @@ -361,12 +361,12 @@ class MonitoringPlugin(object): bol = 'V' + str(level) + ':' + ' ' * level if prefix: bol += '%s' % prefix - if type(output) in [str, str, ]: - print((bol + output)) + if type(output) in [str, ]: + print(bol + output.lstrip().rstrip().replace('\n', '\n' + bol)) elif type(output) in [list, ]: - print(('\n'.join( ['%s%s' % (bol, l) for l in output] ) )) + print('\n'.join( ['%s%s' % (bol, l) for l in output] ) ) else: - print(('%s%s' % (bol, output) )) + print('%s%s' % (bol, output) ) def max_returncode(self, returncodes):