Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
fix getattr clalback on dynamic module
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Mar 9, 2022
1 parent 7ed2e39 commit ee71d3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openpype/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class _ModuleClass(object):
def __init__(self, name):
# Call setattr on super class
super(_ModuleClass, self).__setattr__("name", name)
super(_ModuleClass, self).__setattr__("__name__", name)

# Where modules and interfaces are stored
super(_ModuleClass, self).__setattr__("__attributes__", dict())
Expand All @@ -72,7 +73,7 @@ def __getattr__(self, attr_name):
if attr_name not in self.__attributes__:
if attr_name in ("__path__", "__file__"):
return None
raise ImportError("No module named {}.{}".format(
raise AttributeError("'{}' has not attribute '{}'".format(
self.name, attr_name
))
return self.__attributes__[attr_name]
Expand Down

0 comments on commit ee71d3b

Please sign in to comment.