From e0841aa1bf02b5ed90aac8e4f2a0d8d4c58128f3 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Tue, 24 Aug 2021 16:34:35 -0400 Subject: Remove unnecessary check on type --- python/typelibrary.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/typelibrary.py b/python/typelibrary.py index e392557f..2d64b724 100644 --- a/python/typelibrary.py +++ b/python/typelibrary.py @@ -280,8 +280,7 @@ class TypeLibrary: """ if not isinstance(name, types.QualifiedName): name = types.QualifiedName(name) - if isinstance(type, types.MutableType): - type = type.immutable_copy() + type = type.immutable_copy() if not isinstance(type, types.Type): raise ValueError("type must be a Type") core.BNAddTypeLibraryNamedObject(self.handle, name._get_core_struct(), type.handle) @@ -302,8 +301,7 @@ class TypeLibrary: """ if not isinstance(name, types.QualifiedName): name = types.QualifiedName(name) - if isinstance(type, types.MutableType): - type = type.immutable_copy() + type = type.immutable_copy() if not isinstance(type, types.Type): raise ValueError("parameter type must be a Type") core.BNAddTypeLibraryNamedType(self.handle, name._get_core_struct(), type.handle) -- cgit v1.3.1