diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-03-18 20:26:31 +0100 |
---|---|---|
committer | lupoDharkael <izhe@hotmail.es> | 2024-03-21 10:29:57 +0100 |
commit | 8741b2e2724fabb25465c06c3a4f881d9aa28d67 (patch) | |
tree | 05d065a70a6d0b28c714047f6c111077827cc1c1 /src/utils | |
parent | 167fd296343870a5e6f94eaba749bc7722d2e7cb (diff) |
src: change generic exception types to be more explicit
Replace exception types to be more explicit about the nature of
the error.
Improve the exception raising semantics by using the 'from' keyword,
this wraps an older exception into a new one so it is still considered
the same object.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/boot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/boot.py b/src/utils/boot.py index c9b12ee..528c052 100644 --- a/src/utils/boot.py +++ b/src/utils/boot.py @@ -52,7 +52,7 @@ def _boot_bios_windows(disk, part, mountpoint): with open(f'{mountpoint}/ogboot.secondboot', 'w') as f: f.write('\0' * (3072)) except OSError as e: - raise RuntimeError(f'Could not create ogboot files in Windows partition: {e}') + raise OSError(f'Could not create ogboot files in Windows partition: {e}') from e def _boot_uefi_windows(disk, part, mountpoint): logging.info(f'Booting windows system') |