mirror of https://github.com/mikaku/Monitorix.git
3.0: fixed to check if string has any value
This commit is contained in:
parent
25bbc213f1
commit
0d0b02b915
|
@ -35,9 +35,11 @@ sub logger {
|
||||||
sub trim {
|
sub trim {
|
||||||
my $str = shift;
|
my $str = shift;
|
||||||
|
|
||||||
$str =~ s/^\s+//;
|
if($str) {
|
||||||
$str =~ s/\s+$//;
|
$str =~ s/^\s+//;
|
||||||
return $str;
|
$str =~ s/\s+$//;
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_nvidia_data {
|
sub get_nvidia_data {
|
||||||
|
|
Loading…
Reference in New Issue