diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/typelibrary.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py index c9ddd37b..724f8c5e 100644 --- a/python/typelibrary.py +++ b/python/typelibrary.py @@ -87,8 +87,10 @@ class TypeLibrary: :param str path: :rtype: None + :raises: OSError if saving the file fails """ - core.BNWriteTypeLibraryToFile(self.handle, path) + if not core.BNWriteTypeLibraryToFile(self.handle, path): + raise OSError(f"Failed to write type library to '{path}'") @staticmethod def from_name(arch: architecture.Architecture, name: str): |
