summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/sw_inventory.py2
-rw-r--r--src/utils/uefi.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/sw_inventory.py b/src/utils/sw_inventory.py
index c7bb458..5f137f2 100644
--- a/src/utils/sw_inventory.py
+++ b/src/utils/sw_inventory.py
@@ -88,7 +88,7 @@ def _get_package_set_windows(hivepath):
h = hivex.Hivex(hivepath)
_fill_package_set_1(h, packages)
_fill_package_set_2(h, packages)
- except Exception as e:
+ except RuntimeError as e:
logging.error(f'Hivex was not able to operate over {hivepath}. Reported: {e}')
return packages
diff --git a/src/utils/uefi.py b/src/utils/uefi.py
index 17b35cb..0906ae9 100644
--- a/src/utils/uefi.py
+++ b/src/utils/uefi.py
@@ -139,12 +139,12 @@ def copy_windows_efi_bootloader(disk, partition):
if os.path.exists(destination_dir):
try:
shutil.rmtree(destination_dir)
- except Exception as e:
+ except OSError as e:
raise OgError(f'Failed to delete {destination_dir}: {e}') from e
logging.info(f'Copying {loader_dir} into {destination_dir}')
try:
shutil.copytree(loader_dir, destination_dir)
- except Exception as e:
+ except OSError as e:
raise OgError(f'Failed to copy {loader_dir} into {destination_dir}: {e}') from e
finally:
umount(mountpoint)