##// END OF EJS Templates
MAINT: Remove unncessary try/catch around import_item....
Scott Sanderson -
Show More
@@ -985,13 +985,8 b' class ForwardDeclaredMixin(object):'
985 Find the specified class name by looking for it in the module in which
985 Find the specified class name by looking for it in the module in which
986 our this_class attribute was defined.
986 our this_class attribute was defined.
987 """
987 """
988 try:
988 modname = self.this_class.__module__
989 modname = self.this_class.__module__
989 return import_item('.'.join([modname, string]))
990 return import_item('.'.join([modname, string]))
991 except AttributeError:
992 raise ImportError(
993 "Module {} has no attribute {}".format(modname, string)
994 )
995
990
996
991
997 class ForwardDeclaredType(ForwardDeclaredMixin, Type):
992 class ForwardDeclaredType(ForwardDeclaredMixin, Type):
General Comments 0
You need to be logged in to leave comments. Login now