diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-07-12 09:34:36 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2024-07-12 09:54:33 -0400 |
| commit | a4746bdda6ea950ef6f0098de0c23bf11d4c6055 (patch) | |
| tree | e78f6830e9d37f4379934a64810932e10fc226d5 /python | |
| parent | 2d6496d888d76dffa65d46da949effcfc531317f (diff) | |
Prevent crash when trying to rename unknown type in typearchive
Diffstat (limited to 'python')
| -rw-r--r-- | python/typearchive.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/typearchive.py b/python/typearchive.py index 379c7d4c..60897d94 100644 --- a/python/typearchive.py +++ b/python/typearchive.py @@ -262,6 +262,8 @@ class TypeArchive: :param new_name: New type name """ id = self.get_type_id(old_name) + if id is None: + raise RuntimeError(f"Unknown type {old_name}") return self.rename_type_by_id(id, new_name) def rename_type_by_id(self, id: str, new_name: '_types.QualifiedNameType') -> None: |
