From 85d580c094f420d13461f7e0922ec94cd86038b4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 22 Apr 2022 09:51:17 +0200 Subject: [PATCH] fix duplicity snapshotErrors --- ereuse_devicehub/parser/parser.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index 2394628f..f1109f22 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -3,7 +3,6 @@ import logging import uuid from dmidecode import DMIParse -from marshmallow import ValidationError from ereuse_devicehub.parser import base2 from ereuse_devicehub.parser.computer import Computer @@ -347,17 +346,7 @@ class ParseSnapshotLsHw: } def get_snapshot(self): - try: - return Snapshot().load(self.snapshot_json) - except ValidationError as err: - txt = "{}".format(err) - uuid = self.snapshot_json.get('uuid') - wbid = self.snapshot_json.get('wbid') - error = SnapshotErrors( - description=txt, snapshot_uuid=uuid, severity=Severity.Error, wbid=wbid - ) - error.save(commit=True) - raise err + return Snapshot().load(self.snapshot_json) def parse_hwinfo(self): hw_blocks = self.hwinfo_raw.split("\n\n")