diff --git a/status_cloud/src/main.rs b/status_cloud/src/main.rs index 6614975..1a68b99 100644 --- a/status_cloud/src/main.rs +++ b/status_cloud/src/main.rs @@ -60,15 +60,6 @@ fn main() -> Result<(), Box> { } } - match Command::new(args.hddtemp_executable.clone()).output() { - Ok(val) => val, - Err(e) => { - println!("Error running hddtemp at all: {}", e.to_string()); - println!("hddtemp = {}", args.hddtemp_executable.clone()); - return Ok(()); - } - }; - { let mut drive_temps: Vec = vec![]; @@ -82,13 +73,7 @@ fn main() -> Result<(), Box> { } }; - let tmp = match std::str::from_utf8(&output.stdout) { - Ok(val) => val, - Err(e) => { - println!("Error parsing hddtemp output: {}", e.to_string()); - return Ok(()); - } - }.to_string(); + let tmp = String::from_utf8_lossy(&output.stdout).into_owned(); if !tmp.contains("sensor") { drive_temps.push(tmp.replace("\n", "Not running as sudo?"));