summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils/sw_inventory.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/utils/sw_inventory.py b/src/utils/sw_inventory.py
index b2d55c3..c7bb458 100644
--- a/src/utils/sw_inventory.py
+++ b/src/utils/sw_inventory.py
@@ -84,9 +84,12 @@ def _fill_package_set_2(h, pkg_set):
def _get_package_set_windows(hivepath):
packages = set()
- h = hivex.Hivex(hivepath)
- _fill_package_set_1(h, packages)
- _fill_package_set_2(h, packages)
+ try:
+ h = hivex.Hivex(hivepath)
+ _fill_package_set_1(h, packages)
+ _fill_package_set_2(h, packages)
+ except Exception as e:
+ logging.error(f'Hivex was not able to operate over {hivepath}. Reported: {e}')
return packages