Skip to content

Commit e97f67e

Browse files
committed
fixed perfdata
1 parent f7fa7cf commit e97f67e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

idrac_2.2rc4

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ class PARSER:
761761
criticals.append (text)
762762

763763
if self.perf is True and hw[3] and hw[3] != '(N/A)':
764-
perf_data = ' | %s=%s;;;%s;%s' \
764+
perf_data = " | '%s'=%s;;;%s;%s" \
765765
% (hw[4].replace('"', ''), hw[3], conf['sensor_thresholds'][2], conf['sensor_thresholds'][3])
766766
perf_data = perf_data.replace('none','')
767767
else:
@@ -1039,10 +1039,14 @@ if __name__ == '__main__':
10391039
if text:
10401040
print text
10411041

1042-
if not conf['quiet']:
1043-
if text:
1044-
print
1045-
for line in results:
1042+
if text and not conf['quiet']:
1043+
print
1044+
for line in results:
1045+
if conf['quiet']:
1046+
if '|' in line:
1047+
line = '|' + line.split('|')[-1]
1048+
print line
1049+
else:
10461050
print line
10471051

10481052
sys.exit(exit_code)

0 commit comments

Comments
 (0)