From 9586873fa4385c7729d2ec5b69fecb663b2c0874 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 26 Jul 2023 16:33:23 +0200 Subject: [PATCH] fix get sanitize --- ereuse_devicehub/parser/parser.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index e7738e98..7d5e6020 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -26,7 +26,7 @@ class ParseSnapshot: self.hwinfo_raw = snapshot["hwmd"]["hwinfo"] self.lshw_raw = snapshot["hwmd"]["lshw"] self.lscpi_raw = snapshot["hwmd"]["lspci"] - self.sanitize_raw = snapshot["sanitize"] + self.sanitize_raw = snapshot.get("sanitize", []) self.device = {"actions": []} self.components = [] self.monitors = [] @@ -725,7 +725,6 @@ class ParseSnapshotLsHw: return dmi_uuid def get_data_storage(self): - for sm in self.smart: if sm.get('smartctl', {}).get('exit_status') == 1: continue